mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-04-08 17:51:16 +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
1f4b996077
commit
d70309b7e0
8
debian/changelog
vendored
8
debian/changelog
vendored
@ -1,3 +1,11 @@
|
||||
livecd-rootfs (2.408.57) 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.408.56) xenial; urgency=medium
|
||||
|
||||
* Backport enabling of adding extra snaps to ubuntu-core images via the
|
||||
|
@ -220,6 +220,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
|
||||
# and if initramfs-tools was configured before our kernel,
|
||||
# /etc/kernel/postinst.d/initramfs-tools will have created
|
||||
|
@ -875,6 +875,19 @@ EOF
|
||||
;;
|
||||
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
|
||||
cat > config/binary_rootfs/excludes << EOF
|
||||
boot/vmlinu?-*
|
||||
|
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