From 791da4d139d300e4a96b897dc3adc454cb6d876a Mon Sep 17 00:00:00 2001 From: Thomas Hipp Date: Wed, 6 Mar 2019 20:30:37 +0100 Subject: [PATCH] sources: Fix openSUSE --allow-downgrade flag Signed-off-by: Thomas Hipp --- distrobuilder/chroot.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/distrobuilder/chroot.go b/distrobuilder/chroot.go index 342db01..61d502e 100644 --- a/distrobuilder/chroot.go +++ b/distrobuilder/chroot.go @@ -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 {