[dpkg] 146/192: debian: Remove alternative logs when purging dpkg (!?)

Ximin Luo infinity0 at debian.org
Tue Oct 17 11:04:12 UTC 2017


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

infinity0 pushed a commit to branch pu/reproducible_builds
in repository dpkg.

commit f310046425d3527cfad39072216373f34af9ca31
Author: Guillem Jover <guillem at debian.org>
Date:   Sun Sep 24 20:57:22 2017 +0200

    debian: Remove alternative logs when purging dpkg (!?)
---
 debian/changelog   | 1 +
 debian/dpkg.postrm | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index eb1f5e8..13a01b2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -133,6 +133,7 @@ dpkg (1.19.0) UNRELEASED; urgency=medium
     - Remove workaround for ancient gcc lacking stackprotectorstrong support.
     - Remove maintainer script code to handle downgrades to pre-triggers and
       pre-multiarch dpkg versions.
+    - Remove alternative logs when purging dpkg (!?).
   * Test suite:
     - Enable perlcritic Documentation::RequirePodSections and
       Miscellanea::ProhibitTies.
diff --git a/debian/dpkg.postrm b/debian/dpkg.postrm
index 9b0234b..8fe5a64 100755
--- a/debian/dpkg.postrm
+++ b/debian/dpkg.postrm
@@ -5,7 +5,10 @@ set -e
 
 # Remove log file when dpkg is purged
 remove_logfile() {
-    rm -f /var/log/dpkg.log /var/log/dpkg.log.* 2>/dev/null
+    logdir=/var/log
+
+    rm -f $logdir/dpkg.log $logdir/dpkg.log.* 2>/dev/null
+    rm -f $logdir/alternatives.log $logdir/alternatives.log.* 2>/dev/null
 }
 
 case "$1" in

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



More information about the Reproducible-commits mailing list