fixed issue #2471 where it wouldn't show info when packages are in a group (#2576)

fixed issue #2471 where it wouldn't show info when packages are in a group and modified test
This commit is contained in:
Dominik Link
2025-02-17 15:28:35 +01:00
committed by GitHub
parent 6807ecc081
commit d37e365ac3
2 changed files with 31 additions and 0 deletions

View File

@@ -43,6 +43,20 @@ func syncInfo(ctx context.Context, run *runtime.Runtime,
)
pkgS = query.RemoveInvalidTargets(run.Logger, pkgS, run.Cfg.Mode)
expandedPackages := []string{}
for _, pkg := range pkgS {
groupPackages := dbExecutor.PackagesFromGroup(pkg)
if len(groupPackages) > 0 {
for _, p := range groupPackages {
expandedPackages = append(expandedPackages, p.Name())
}
} else {
expandedPackages = append(expandedPackages, pkg)
}
}
pkgS = expandedPackages
aurS, repoS := packageSlices(pkgS, run.Cfg, dbExecutor)
if len(repoS) == 0 && len(aurS) == 0 {