blueprints: fix group handling

When group names are passed on to dnf, they must be prefixed with an
ampersand, or they are treated as a regular package, potentially
causing the build to fail.

Add a testcase to verify this behavior.

This resolves rhbz#1784035.

Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
Tom Gundersen 2019-12-16 16:46:51 +01:00 committed by Lars Karlitski
parent 66885bc9d6
commit 93b13e3fa7
3 changed files with 307 additions and 1 deletions

View file

@ -42,7 +42,7 @@ func (b *Blueprint) GetPackages() []string {
packages = append(packages, pkg.ToNameVersion())
}
for _, group := range b.Groups {
packages = append(packages, group.Name)
packages = append(packages, "@"+group.Name)
}
return packages
}