Ubuntu Pastebin

Paste from ubuntu at Tue, 5 Apr 2016 23:55:33 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
--- /usr/share/autopkgtest/setup-commands/setup-testbed.dist	2016-04-05 23:46:05.814097049 +0000
+++ /usr/share/autopkgtest/setup-commands/setup-testbed	2016-04-05 23:55:30.097937993 +0000
@@ -178,18 +178,27 @@
     [ ! -d "$root/usr/share/doc/cloud-init" ] || have_cloudinit=1
 
     # clean up bloat from Ubuntu cloud images when building an image
-    for p in accountsservice apt-xapian-index cryptsetup landscape-client \
-             landscape-common open-vm-tools w3m vim-runtime aptitude-common \
-             command-not-found-data manpages ntfs-3g sosreport \
-             ubuntu-release-upgrader-core libcpan-changes-perl git \
-             cgmanager lxc lxd lxd-client open-iscsi mdadm dmeventd lvm2 \
-             unattended-upgrades update-notifier-common ureadahead debootstrap \
-             lxcfs ppp pppconfig pppoeconf \
-             thermald xdg-user-dirs xkb-data zerofree xml-core; do
-        if [ -d "$root/usr/share/doc/$p" ]; then
-            chroot "$root" eatmydata apt-get --auto-remove -y purge $p || true
-        fi
+    topurge="
+        accountsservice apt-xapian-index cryptsetup landscape-client
+        landscape-common open-vm-tools w3m vim-runtime aptitude-common
+        command-not-found-data manpages ntfs-3g sosreport
+        ubuntu-release-upgrader-core libcpan-changes-perl git
+        cgmanager lxc lxd lxd-client open-iscsi mdadm dmeventd lvm2
+        unattended-upgrades update-notifier-common ureadahead debootstrap
+        lxcfs ppp pppconfig pppoeconf
+        thermald xdg-user-dirs xkb-data zerofree xml-core"
+    present=""
+    for p in $topurge; do
+        [ -d "$root/usr/share/doc/$p" ] && present="${present} $p"
     done
+    present=${present# }
+    if [ -n "$present" ]; then
+        echo "removing $present" 1>&2
+        DEBIAN_FRONTEND=noninteractive chroot "$root" eatmydata apt-get --auto-remove -y purge $present </dev/null ||
+            echo "WARN, failed to purge something in $present"
+    else
+        echo "no packages to remove" 1>&2
+    fi
 
     if [ "${ADT_SETUP_VM_UPGRADE:-}" != "false" ]; then
         DEBIAN_FRONTEND=noninteractive chroot "$root" eatmydata apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade
Download as text