Fix virtual packages not being accounted for in GetDependants function
This commit is contained in:
parent
e60381beb1
commit
151de2112e
@ -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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user