rhel84: remove excluded package if explicitly specified in the bp
When a users wants to install a package that itself is excluded or its dependency is excluded, it fails the build. There is no known workaround for this shorcoming of our current design. Therefore, remove a package from the list of excluded if it is explicitly mentioned in a blueprint. This will not solve the issue with dependencies, but it will create a possibility of a workaround. Also, introduce regression test to verify the bug fix and hook it into CentOS CI (this issue was reported against RHEL, but CentOS runs on AWS so it is better to verify the fix there).
This commit is contained in:
parent
06361267d5
commit
98dd7d7737
3 changed files with 69 additions and 1 deletions
|
|
@ -217,7 +217,18 @@ func (t *imageType) Packages(bp blueprint.Blueprint) ([]string, []string) {
|
|||
packages = removePackage(packages, "insights-client")
|
||||
}
|
||||
|
||||
return packages, t.excludedPackages
|
||||
// copy the list of excluded packages from the image type
|
||||
// and subtract any packages found in the blueprint (this
|
||||
// will not handle the issue with dependencies present in
|
||||
// the list of excluded packages, but it will create a
|
||||
// possibility of a workaround at least)
|
||||
excludedPackages := append([]string(nil), t.excludedPackages...)
|
||||
for _, pkg := range bp.GetPackages() {
|
||||
// removePackage is fine if the package doesn't exist
|
||||
excludedPackages = removePackage(excludedPackages, pkg)
|
||||
}
|
||||
|
||||
return packages, excludedPackages
|
||||
}
|
||||
|
||||
func (t *imageType) BuildPackages() []string {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue