From bc0edf358d51bd1af5aa4824a189b163d8fa2c75 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Fri, 6 Dec 2019 11:38:47 +1300 Subject: [PATCH] Preserve ubuntu-advantage-tools' apt preferences against live-build's attempt to delete them. --- debian/changelog | 7 +++++++ live-build/auto/build | 6 ++++++ live-build/auto/config | 12 ++++++++++++ 3 files changed, 25 insertions(+) diff --git a/debian/changelog b/debian/changelog index 5f025596..12d1bd5d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (2.208.18) UNRELEASED; urgency=medium + + * Preserve ubuntu-advantage-tools' apt preferences against live-build's + attempt to delete them. + + -- Michael Hudson-Doyle Fri, 06 Dec 2019 10:23:03 +1300 + livecd-rootfs (2.208.17) trusty; urgency=medium * Drop /etc/update-motd.d/51-cloudguest from cloud images; this is not diff --git a/live-build/auto/build b/live-build/auto/build index 235ed3b8..2c2ff9fa 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -49,6 +49,12 @@ EOF lb chroot "$@" + if [ -d chroot/etc/apt/preferences.d.save ]; then + # https://twitter.com/infinite_scream + mv chroot/etc/apt/preferences.d.save/* chroot/etc/apt/preferences.d/ + rmdir chroot/etc/apt/preferences.d.save + fi + if [ -f config/oem-config-preinstalled ]; then # This is cargo-culted almost verbatim (with some syntax changes for diff --git a/live-build/auto/config b/live-build/auto/config index 07cd8f25..71c007e5 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -632,6 +632,18 @@ case $PROJECT in cat > config/hooks/100-remove-fstab.chroot < config/hooks/100-preserve-ua-tools-prefs.chroot <