[Piuparts-commits] [piuparts] 39/51: post_du_exceptions: buster: remove empty unowned /etc/dbus-1/{system.d/, }

Holger Levsen holger at layer-acht.org
Thu Jul 20 21:15:05 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 3f80305c0a7e78495e812e71cc3c4bf0625cf6e5
Author: Andreas Beckmann <anbe at debian.org>
Date:   Sun Jul 2 12:32:03 2017 +0200

    post_du_exceptions: buster: remove empty unowned /etc/dbus-1/{system.d/,}
    
    systemd no longer ships /etc/dbus-1/system.d/* in buster, but dpkg does
    not clean up the now empty unowned directories after the upgrade from
    stretch to buster
    
    cleanup will happen if another package ships /etc/dbus-1/system.d/*
    in buster and gets purged in buster, causing discrepancies with the
    reference chroot:
    
      ERROR: FAIL: After purging files have disappeared:
        /etc/dbus-1/	 owned by: dbus
        /etc/dbus-1/system.d/	 owned by: dbus
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 custom-scripts/scripts/post_distupgrade_exceptions | 13 +++++++++++++
 debian/changelog                                   |  2 ++
 2 files changed, 15 insertions(+)

diff --git a/custom-scripts/scripts/post_distupgrade_exceptions b/custom-scripts/scripts/post_distupgrade_exceptions
index 7492dab..a9fea71 100755
--- a/custom-scripts/scripts/post_distupgrade_exceptions
+++ b/custom-scripts/scripts/post_distupgrade_exceptions
@@ -81,3 +81,16 @@ if [ "$PIUPARTS_DISTRIBUTION" = "stretch" ]; then
 	done
 
 fi
+
+if [ "$PIUPARTS_DISTRIBUTION" = "buster" ]; then
+
+	# dpkg does not properly clean up directories getting empty and no longer shipped
+	for dir in /etc/dbus-1/system.d /etc/dbus-1
+	do
+		if [ -d "$dir" ]; then
+			rmdir --ignore-fail-on-non-empty "$dir"
+			test -d "$dir" || echo "removed empty directory '$dir'"
+		fi
+	done
+
+fi
diff --git a/debian/changelog b/debian/changelog
index a9656ae..0d63ee1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -71,6 +71,8 @@ piuparts (0.78) UNRELEASED; urgency=medium
   * scripts/post_{setup,distupgrade}_zz_backports: Avoid downgrading
     systemd/udev from jessie-backports to jessie during removal phase.
     (Closes: #856845)
+  * scripts/post_distupgrade_exceptions: Remove empty unowned /etc/dbus-1/,
+    /etc/dbus-1/system.d/ after upgrading to buster.
   * scripts-broken-symlinks/post_install_extras_unbreak_symlinks: New script
     for "fixing" some broken symlinks (e.g. by installing selected suggested
     packages) in tests using --fail-on-broken-symlinks.

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