mirror of
https://github.com/EnumeratedDev/bpm.git
synced 2026-10-31 11:01:48 +00:00
Fix virtual packages not being accounted for in GetDependants function
This commit is contained in:
1 parent
e60381beb1
commit
151de2112e
1 file changed
+14
-1
+14
-1
@@ -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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user