Tim Andersson has proposed merging 
~andersson123/autopkgtest-cloud:fix_trusty_apt_autopkgtest_compatibility into 
autopkgtest-cloud:master.

Requested reviews:
  Canonical's Ubuntu QA (canonical-ubuntu-qa)

For more details, see:
https://code.launchpad.net/~andersson123/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/447777
-- 
Your team Canonical's Ubuntu QA is requested to review the proposed merge of 
~andersson123/autopkgtest-cloud:fix_trusty_apt_autopkgtest_compatibility into 
autopkgtest-cloud:master.
diff --git a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker-config-production/setup-canonical.sh b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker-config-production/setup-canonical.sh
index 04c1b34..4136fa6 100644
--- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker-config-production/setup-canonical.sh
+++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker-config-production/setup-canonical.sh
@@ -34,7 +34,11 @@ EOF
 # already dist-upgraded the system. Force the usage of the conf files of the
 # package being installed (--force-confnew), as conf files "from the future"
 # may not be supported by the older package version we're downgrading to.
-DEBIAN_FRONTEND=noninteractive eatmydata apt-get -y --allow-downgrades -o Dpkg::Options::="--force-confnew" dist-upgrade
+if [ "${RELEASE}" = "trusty" ] || [ "${RELEASE}" = "xenial" ]; then
+    DEBIAN_FRONTEND=noninteractive eatmydata apt-get -y -o Dpkg::Options::="--force-confnew" dist-upgrade
+else
+    DEBIAN_FRONTEND=noninteractive eatmydata apt-get -y --allow-downgrades -o Dpkg::Options::="--force-confnew" dist-upgrade
+fi
 rm /etc/apt/preferences.d/force-downgrade-to-release.pref
 
 # Remove packages not available from any configured repository, e.g.
-- 
Mailing list: https://launchpad.net/~canonical-ubuntu-qa
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~canonical-ubuntu-qa
More help   : https://help.launchpad.net/ListHelp

Reply via email to