mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-03-06 08:51:10 +00:00
Preserve apt preferences created by any package we install (i.e. ubuntu-advantage-tools) against live-build's attempt to delete them. (LP: #1855354)
This commit is contained in:
parent
e0c02f2c28
commit
d381420065
8
debian/changelog
vendored
8
debian/changelog
vendored
@ -1,3 +1,11 @@
|
||||
livecd-rootfs (2.525.36) UNRELEASED; 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 15:43:56 +1300
|
||||
|
||||
livecd-rootfs (2.525.35) bionic; urgency=medium
|
||||
|
||||
* Did not expect the bionic branch being so outdated. Backport support
|
||||
|
@ -261,6 +261,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 [ "${SUBPROJECT:-}" = minimized ]; then
|
||||
# force removal of initramfs-tools, which we assert is not
|
||||
# required for any minimized images but is still pulled in by
|
||||
|
@ -1039,6 +1039,19 @@ rm -f /etc/fstab
|
||||
EOF
|
||||
fi
|
||||
|
||||
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 [ $PROJECT = ubuntukylin ]; then
|
||||
cat > config/hooks/100-ubuntukylin.chroot <<EOF
|
||||
#! /bin/sh
|
||||
|
8
live-build/ubuntu-cpc/hooks.d/chroot/100-preserve-apt-prefs.chroot
Executable file
8
live-build/ubuntu-cpc/hooks.d/chroot/100-preserve-apt-prefs.chroot
Executable 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
|
Loading…
x
Reference in New Issue
Block a user