From: Paul Hänsch Date: Tue, 17 Sep 2019 03:02:59 +0000 (+0200) Subject: more reliable removal of packages X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=a917a5c3819cc0e87769c48c60d7c60efe340014;p=blast more reliable removal of packages --- diff --git a/Makefile b/Makefile index 29a2582..274d1c7 100644 --- a/Makefile +++ b/Makefile @@ -221,7 +221,7 @@ _norecommends: ${SYSROOT}/etc/apt/apt.conf.d/10norecommends ${SYSROOT}/etc/apt/apt.conf.d/10norecommends: ${SYSROOT} mkdir -p -m 755 "$(dir $@)" - printf 'APT::Install-Recommends "false";\n' >"$@" + printf 'APT::%s "false";\n' "Install-Recommends" "Keep-Recommends" "Install-Suggests" "Keep-Suggests" >"$@" chmod 644 "$@" ${SYSROOT}/etc/apt/trusted.gpg.d/: ${SYSROOT} _bootstrap @@ -236,6 +236,9 @@ _install: ${SYSROOT} _aptkeys _norecommends chroot "$${SYSROOT}" ln -sf /bin/true /usr/local/sbin/invoke-rc.d chroot "$${SYSROOT}" ln -sf /bin/true /usr/sbin/udevadm chroot "$${SYSROOT}" apt-get --yes install ${PACKAGES} + mkdir -p -m 755 "$${SYSROOT}/var/lib/deborphan/" + chroot "$${SYSROOT}" sh -c 'printf "%s\\n" ${PACKAGES} >/var/lib/deborphan/keep' + -chroot "$${SYSROOT}" sh -c 'apt-get --yes purge $$(deborphan -an |sed "s;^.* ;;g")' chroot "$${SYSROOT}" apt-get --yes --auto-remove purge -chroot "$${SYSROOT}" apt-get --yes --auto-remove upgrade chroot "$${SYSROOT}" apt-get clean