Remove landscape-common from minimal image, and handle restoring it in

unminimize script.  LP: #1763182.
ubuntu/cosmic
Steve Langasek 7 years ago
parent 862ace223d
commit e6089e9e32

7
debian/changelog vendored

@ -1,3 +1,10 @@
livecd-rootfs (2.522) UNRELEASED; urgency=medium
* Remove landscape-common from minimal image, and handle restoring it in
unminimize script. LP: #1763182.
-- Steve Langasek <steve.langasek@ubuntu.com> Wed, 11 Apr 2018 14:26:14 -0700
livecd-rootfs (2.521) bionic; urgency=medium livecd-rootfs (2.521) bionic; urgency=medium
* In subiquity image, mount additional squashfs in /media. * In subiquity image, mount additional squashfs in /media.

@ -158,6 +158,12 @@ if ! dpkg-query --show --showformat='${db:Status-Status}\n' ubuntu-minimal 2> /d
DEBIAN_FRONTEND=noninteractive apt-get install -y ubuntu-minimal DEBIAN_FRONTEND=noninteractive apt-get install -y ubuntu-minimal
fi fi
if dpkg-query --show --showformat='${db:Status-Status}\n' ubuntu-server 2> /dev/null | grep -q '^installed$' \
&& ! dpkg-query --show --showformat='${db:Status-Status}\n' landscape-common 2> /dev/null | grep -q '^installed$'; then
echo "Installing ubuntu-server recommends..."
DEBIAN_FRONTEND=noninteractive apt-get install -y landscape-common
fi
# unminimization succeeded, there is no need to mention it in motd # unminimization succeeded, there is no need to mention it in motd
rm -f /etc/update-motd.d/60-unminimize rm -f /etc/update-motd.d/60-unminimize
@ -203,9 +209,12 @@ EOF
# force removal of initramfs-tools, which we assert is not # force removal of initramfs-tools, which we assert is not
# required for any minimized images but is still pulled in by # required for any minimized images but is still pulled in by
# default # default
# also remove landscape-common, which is heavyweight and
# in the server seed only to provide /etc/motd content which
# would only be seen by humans
Chroot chroot "env DEBIAN_FRONTEND=noninteractive \ Chroot chroot "env DEBIAN_FRONTEND=noninteractive \
apt-get -y purge initramfs-tools busybox-initramfs \ apt-get -y purge initramfs-tools busybox-initramfs \
busybox-static" busybox-static landscape-common"
# 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
# an initramfs despite the generic dpkg-divert; so remove it # an initramfs despite the generic dpkg-divert; so remove it

Loading…
Cancel
Save