Merge pull request #154 from monstermunchkin/fixes/opensuse

sources: Fix openSUSE --allow-downgrade flag
This commit is contained in:
Stéphane Graber 2019-03-06 14:35:30 -05:00 committed by GitHub
commit 7a8993e1da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,6 +52,11 @@ func managePackages(def shared.DefinitionPackages, actions []shared.DefinitionAc
}
}
// TODO: Remove this once openSUSE builds properly without it. OpenSUSE 42.3 doesn't support this flag.
if release != "42.3" {
manager.SetInstallFlags("install", "--allow-downgrade")
}
for _, set := range def.Sets {
if len(set.Releases) > 0 && !lxd.StringInSlice(release, set.Releases) {
continue
@ -71,11 +76,6 @@ func managePackages(def shared.DefinitionPackages, actions []shared.DefinitionAc
}
}
// TODO: Remove this once openSUSE builds properly without it. OpenSUSE 42.3 doesn't support this flag.
if release != "42.3" {
manager.SetInstallFlags("install", "--allow-downgrade")
}
if def.Cleanup {
err = manager.Clean()
if err != nil {