[Piuparts-commits] [piuparts] 01/09: scripts-no-usr-share-doc: add exception for localepurge

Holger Levsen holger at moszumanska.debian.org
Tue Jan 13 11:00:33 UTC 2015


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

holger pushed a commit to branch develop
in repository piuparts.

commit ba610be27044f74b98e231cb2b7946ad0f98ea66
Author: Andreas Beckmann <anbe at debian.org>
Date:   Mon Jan 12 03:03:50 2015 +0100

    scripts-no-usr-share-doc: add exception for localepurge
    
    * cleanup after localepurge means reinstalling packages to restore the
      localization
    * reinstalling with no-usr-share-doc means losing things in /usr/share/doc
    ==> reinstall the reinstallation candidates already before recording the
        reference system to not remember stuff that will disappear from /u/s/d
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
 .../post_setup_disable_usr_share_doc                  | 19 +++++++++++++++++++
 debian/changelog                                      |  1 +
 2 files changed, 20 insertions(+)

diff --git a/custom-scripts/scripts-no-usr-share-doc/post_setup_disable_usr_share_doc b/custom-scripts/scripts-no-usr-share-doc/post_setup_disable_usr_share_doc
index c8d8f01..27f9c22 100755
--- a/custom-scripts/scripts-no-usr-share-doc/post_setup_disable_usr_share_doc
+++ b/custom-scripts/scripts-no-usr-share-doc/post_setup_disable_usr_share_doc
@@ -1,6 +1,10 @@
 #!/bin/sh
 set -e
 
+log_debug() {
+	echo "Debug: piuparts exception for package $PIUPARTS_OBJECTS"
+}
+
 case ${PIUPARTS_OBJECTS%%=*} in
 	dpkg)
 		# skip while creating the tarball
@@ -28,3 +32,18 @@ if [ -n "$CANDIDATES" ]; then
 		apt-get -u --reinstall install $package
 	done
 fi
+
+case ${PIUPARTS_OBJECTS%%=*} in
+	localepurge)
+		case ${PIUPARTS_DISTRIBUTION} in
+			lenny*|squeeze*) ;;
+			*)
+				# reinstall packages that will be reinstalled after purge
+				# to not record their /usr/share/doc content that is about to disappear
+				log_debug
+				EXTRA="base-passwd"
+				apt-get -u --reinstall --fix-missing install $(dpkg -S LC_MESSAGES | cut -d: -f1 | tr ', ' '\n' | sort -u) $EXTRA
+				;;
+		esac
+		;;
+esac
diff --git a/debian/changelog b/debian/changelog
index 7b8008c..929ebbe 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,7 @@ piuparts (0.63) UNRELEASED; urgency=medium
   * piuparts-slave.py:
     - Handle Ctrl-C while downloading Packages files and flush/unreserve, too.
     - Catch another exception that may happen while talking to the master.
+  * scripts-no-usr-share-doc: Add exception for localepurge.
 
   [ Holger Levsen ]
   * piuparts.conf.pejacevic: add new suite: jessie2proposed.

-- 
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