[Piuparts-commits] [piuparts] 01/03: p: ensure /etc/mtab exists in the chroot

Holger Levsen holger at moszumanska.debian.org
Wed Jun 17 13:12:03 UTC 2015


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

holger pushed a commit to branch master
in repository piuparts.

commit f9aed0009df71f4c77d1cf6dcf5da0ceb14bc45f
Author: Andreas Beckmann <anbe at debian.org>
Date:   Wed Jun 17 12:21:15 2015 +0200

    p: ensure /etc/mtab exists in the chroot
    
    mount in sid no longer creates a missing /etc/mtab -> ../proc/mounts symlink
    but commands like df rely on /etc/mtab
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
 debian/changelog | 4 +++-
 piuparts.py      | 3 +++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index cf909e9..fa00be9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 piuparts (0.65) UNRELEASED; urgency=medium
 
-  * continue development...
+  [ Andreas Beckmann ]
+  * piuparts.py:
+    - Ensure /etc/mtab exists in the chroot.
 
  -- Holger Levsen <holger at debian.org>  Fri, 12 Jun 2015 13:43:42 +0200
 
diff --git a/piuparts.py b/piuparts.py
index b2dd507..3c96cf0 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -1522,6 +1522,9 @@ class Chroot:
     def mount_proc(self):
         """Mount /proc inside chroot."""
         self.run(["mount", "-t", "proc", "proc", "/proc"])
+        etcmtab = self.relative("etc/mtab")
+        if not os.path.lexists(etcmtab):
+            os.symlink("../proc/mounts", etcmtab)
         self.mkdir_p("dev/pts")
         self.run(["mount", "-t", "devpts", "devpts", "/dev/pts"])
 

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