[Piuparts-commits] [piuparts] 09/11: p: mount /dev/pts into the chroot

Holger Levsen holger at moszumanska.debian.org
Fri Jan 23 12:18:05 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 161ce76d1909b039922413bff803841ff7a3e933
Author: Andreas Beckmann <anbe at debian.org>
Date:   Sun Jan 18 05:51:39 2015 +0100

    p: mount /dev/pts into the chroot
    
    recent apt complained with
    E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory)
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
 TODO             | 5 +----
 debian/changelog | 1 +
 piuparts.py      | 3 +++
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/TODO b/TODO
index ba7554e..d3dca47 100644
--- a/TODO
+++ b/TODO
@@ -85,9 +85,6 @@ without --warn-on-others to avoid adding artificial barriers where package
 subsets are configured
   (wheezy2jessie-rcmd is *not* the solution for this)
 
-- mount /dev/pts:
-  E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory)
-
 - record file ownership by user/group name, not id
   new dynamic system users added to the base system may have a lower id in the
   reference system than after actually testing some packages
@@ -143,7 +140,7 @@ for 0.8x and later:
 - make it possible to call aptitude (or similar) instead of apt-get and allow to
   override the commandline arguments.
 
-- mounting /proc and perhaps others (usbfs, sysfs, /dev/pts, etc.) in the chroot
+- mount perhaps others (usbfs, sysfs, etc.) in the chroot
   might be a good idea because some packages might need this.
 
 - rewrite piuparts-analyze to run over all sections and cache BTS responses
diff --git a/debian/changelog b/debian/changelog
index 569ba61..03198aa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ piuparts (0.63) UNRELEASED; urgency=medium
       symlinks: report all symlinks and their targets.
     - Reinstall base system packages missing upon removal with
       --no-install-recommends.
+    - Mount /dev/pts into the chroot. Wanted by recent apt.
   * piuparts.conf:
     - Enable --warn-on-debsums-errors for all jessie tests.
     - Add new suite: jessie-pu (test only packages in jessie-proposed-updates).
diff --git a/piuparts.py b/piuparts.py
index e563af7..c2c47ad 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -1488,10 +1488,13 @@ class Chroot:
     def mount_proc(self):
         """Mount /proc inside chroot."""
         self.run(["mount", "-t", "proc", "proc", "/proc"])
+        self.mkdir_p("dev/pts")
+        self.run(["mount", "-t", "devpts", "devpts", "/dev/pts"])
 
     def unmount_proc(self):
         """Unmount /proc inside chroot."""
         self.run(["umount", "/proc"], ignore_errors=True)
+        self.run(["umount", "/dev/pts"], ignore_errors=True)
         for bindmount in settings.bindmounts:
             run(["umount", self.relative(bindmount)], 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