Reorganize codebase #10

Merged
EnumDev merged 23 commits from code_reorganization into develop 2025-04-17 11:49:52 +00:00
Showing only changes of commit 151de2112e - Show all commits

View File

@ -1308,8 +1308,21 @@ func (pkgInfo *PackageInfo) GetDependants(rootDir string) ([]string, error) {
if bpmpkg == nil { if bpmpkg == nil {
return nil, errors.New("package not found: " + pkg) return nil, errors.New("package not found: " + pkg)
} }
if bpmpkg.PkgInfo.Name != pkgInfo.Name && slices.Contains(bpmpkg.PkgInfo.GetAllDependencies(false, true), pkgInfo.Name) { if bpmpkg.PkgInfo.Name == pkgInfo.Name {
continue
}
dependencies := bpmpkg.PkgInfo.GetAllDependencies(false, true)
if slices.Contains(dependencies, pkgInfo.Name) {
ret = append(ret, pkg) ret = append(ret, pkg)
continue
}
for _, vpkg := range pkgInfo.Provides {
if slices.Contains(dependencies, vpkg) {
ret = append(ret, pkg)
break
}
} }
} }