[Piuparts-commits] [piuparts] 05/23: p: check before unmounting /proc/sys/fs/binfmt_misc

Holger Levsen holger at layer-acht.org
Tue Jan 17 12:39:46 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 137a518b981a74ca465eecb9a005821aa4415706
Author: Andreas Beckmann <anbe at debian.org>
Date:   Mon Jan 16 10:03:59 2017 +0100

    p: check before unmounting /proc/sys/fs/binfmt_misc
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 debian/changelog | 1 +
 piuparts.py      | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 072a474..73fc0fb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ piuparts (0.75) UNRELEASED; urgency=medium
       + /etc/network/
       + /etc/php/7.0/ and selected subdirs
     - Run panic handlers in reverse order.
+    - Unmount /proc/sys/fs/binfmt_misc only if mounted.
   * Add/adjust some exceptions for ancient packages.
 
  -- Andreas Beckmann <anbe at debian.org>  Sun, 15 Jan 2017 20:34:58 +0100
diff --git a/piuparts.py b/piuparts.py
index 1c756f1..fd64e25 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -1624,7 +1624,9 @@ class Chroot:
         # Workaround to unmount /proc/sys/fs/binfmt_misc which is mounted by
         # update-binfmts but never unmounted
         # This workaround can be removed once #847788 is fixed
-        run(["umount", self.relative("/proc/sys/fs/binfmt_misc")], ignore_errors=True)
+        binfmt_misc = self.relative("/proc/sys/fs/binfmt_misc")
+        if os.path.ismount(binfmt_misc):
+            self.mounts.append(binfmt_misc)
 
         for mountpoint in reversed(self.mounts):
             run(["umount", mountpoint], ignore_errors=True)

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