[Piuparts-commits] [piuparts] 02/04: pre_remove_exceptions: allow removal of essential packages from stretch

Holger Levsen holger at layer-acht.org
Wed Jan 25 10:33:27 UTC 2017


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit f9659683f9bdb41cf819fc2896e84fc328a2e648
Author: Andreas Beckmann <anbe at debian.org>
Date:   Wed Jan 25 01:06:57 2017 +0100

    pre_remove_exceptions: allow removal of essential packages from stretch
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 custom-scripts/scripts/post_remove_exceptions |  3 +++
 custom-scripts/scripts/pre_remove_exceptions  | 17 +++++++++++++++++
 debian/changelog                              |  4 +++-
 3 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/custom-scripts/scripts/post_remove_exceptions b/custom-scripts/scripts/post_remove_exceptions
index c1aca07..e33a4ee 100755
--- a/custom-scripts/scripts/post_remove_exceptions
+++ b/custom-scripts/scripts/post_remove_exceptions
@@ -5,6 +5,9 @@ log_debug() {
 	echo "Debug: piuparts exception for package $PIUPARTS_OBJECTS"
 }
 
+# cleanup from pre_remove_exceptions
+rm -fv /etc/apt/apt.conf.d/piuparts-allow-remove-essential
+
 case ${PIUPARTS_OBJECTS%%=*} in
 	asclassic)
 		case "$PIUPARTS_DISTRIBUTION" in
diff --git a/custom-scripts/scripts/pre_remove_exceptions b/custom-scripts/scripts/pre_remove_exceptions
index 6b5b6d6..046f6ba 100755
--- a/custom-scripts/scripts/pre_remove_exceptions
+++ b/custom-scripts/scripts/pre_remove_exceptions
@@ -55,6 +55,23 @@ case ${PIUPARTS_OBJECTS%%=*} in
 		;;
 esac
 
+case "$PIUPARTS_DISTRIBUTION" in
+	stretch*|sid)
+		case ${PIUPARTS_OBJECTS%%=*} in
+			init|\
+			ltsp-client)
+				log_debug
+				# requires removal of essential packages
+				if [ ! -f /etc/apt/apt.conf.d/piuparts-allow-remove-essential ]
+				then
+					echo "Enabling APT::Get::allow-remove-essential"
+					echo 'APT::Get::allow-remove-essential "true";' >> /etc/apt/apt.conf.d/piuparts-allow-remove-essential
+				fi
+				;;
+		esac
+		;;
+esac
+
 # Allow removal of the kernel running on the host from the chroot.
 UNAME_R="$(uname -r)"
 echo "linux-image-$UNAME_R linux-image-$UNAME_R/prerm/removing-running-kernel-$UNAME_R boolean false" | debconf-set-selections
diff --git a/debian/changelog b/debian/changelog
index 581dbb6..ebc9c53 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -20,12 +20,14 @@ piuparts (0.75) UNRELEASED; urgency=medium
   * piuparts-analyze.py:
     - Adjust debianbts syntax to be compatible with both jessie and stretch.
     - Improve exception handling.
+  * Handle more database setup issues.
   * Add/adjust some exceptions for ancient packages.
   * scripts/pre_install_extras: Add examples how to preseed license acceptance
     for non-free and downloader packages.
   * scripts/pre_distupgrade_zz_database-server: Run pg_upgradecluster during
     dist-upgrades.
-  * Detect more database setup issues.
+  * scripts/{pre,post}_remove_exceptions: Support removal of essential
+    packages with apt-get from stretch onwards.
   * known_problems/piuparts-depends-dummy_error.conf: Recognize the failure
     from 'apt-get install piuparts-depends-dummy.deb'.
   * known_problems/problems_and_no_force_error.conf: Recognize the apt 1.1

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list