Imported 2.408.57

No reason for CPC update specified.
This commit is contained in:
CloudBuilder 2020-01-13 08:50:19 +00:00
parent 3d2ae7fe19
commit 15e2fbec06
4 changed files with 35 additions and 0 deletions

8
debian/changelog vendored
View File

@ -1,3 +1,11 @@
livecd-rootfs (2.408.57) xenial; urgency=medium
* Preserve apt preferences created by any package we install (i.e.
ubuntu-advantage-tools) against live-build's attempt to delete them.
(LP: #1855354)
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Thu, 19 Dec 2019 22:42:12 +1300
livecd-rootfs (2.408.56) xenial; urgency=medium livecd-rootfs (2.408.56) xenial; urgency=medium
* Backport enabling of adding extra snaps to ubuntu-core images via the * Backport enabling of adding extra snaps to ubuntu-core images via the

View File

@ -220,6 +220,12 @@ EOF
lb chroot "$@" 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 [ "${SUBPROJECT:-}" = minimized ]; then if [ "${SUBPROJECT:-}" = minimized ]; then
# and if initramfs-tools was configured before our kernel, # and if initramfs-tools was configured before our kernel,
# /etc/kernel/postinst.d/initramfs-tools will have created # /etc/kernel/postinst.d/initramfs-tools will have created

View File

@ -875,6 +875,19 @@ EOF
;; ;;
esac esac
if [ $PROJECT != ubuntu-cpc ]; then
cat > config/hooks/100-preserve-apt-prefs.chroot <<\EOF
#! /bin/sh -ex
# live-build "helpfully" removes /etc/apt/preferences.d/* so we put a
# copy somewhere it won't touch it.
if [ -n "$(ls -A /etc/apt/preferences.d)" ]; then
cp -a /etc/apt/preferences.d /etc/apt/preferences.d.save
fi
EOF
fi
if $BINARY_REMOVE_LINUX; then if $BINARY_REMOVE_LINUX; then
cat > config/binary_rootfs/excludes << EOF cat > config/binary_rootfs/excludes << EOF
boot/vmlinu?-* boot/vmlinu?-*

View File

@ -0,0 +1,8 @@
#! /bin/sh -ex
# live-build "helpfully" removes /etc/apt/preferences.d/* so we put a
# copy somewhere it won't touch it.
if [ -n "$(ls -A /etc/apt/preferences.d)" ]; then
cp -a /etc/apt/preferences.d /etc/apt/preferences.d.save
fi