Package: piuparts Version: 0.84 Severity: normal Tags: patch Hi holger, piuparts just check if it is a link but when you export a chroot from a docker container, this path doesn't exists.
Cheers, -- TiN
From ebb471f5ab6a34a3558c9e8e0c2598179909ff59 Mon Sep 17 00:00:00 2001 From: Agustin Henze <t...@aayy.com.ar> Date: Tue, 10 Apr 2018 16:58:55 -0300 Subject: [PATCH 2/2] Create ${ENV}/dev/ptmx path if it doesn't exist Signed-off-by: Agustin Henze <t...@aayy.com.ar> --- piuparts.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/piuparts.py b/piuparts.py index 16df93d7..d9a3428a 100644 --- a/piuparts.py +++ b/piuparts.py @@ -1751,7 +1751,11 @@ class Chroot: if not os.path.lexists(etcmtab): os.symlink("../proc/mounts", etcmtab) self.mount("devpts", "/dev/pts", fstype="devpts", opts="newinstance,noexec,nosuid,gid=5,mode=0620,ptmxmode=0666") - if not os.path.islink(self.relative("dev/ptmx")): + dev_ptmx_rel_path = self.relative("dev/ptmx") + if not os.path.islink(dev_ptmx_rel_path): + if not os.path.exists(dev_ptmx_rel_path): + with open(dev_ptmx_rel_path, 'w'): + pass self.mount(self.relative("dev/pts/ptmx"), "/dev/ptmx", opts="bind", no_mkdir=True) p = subprocess.Popen(["tty"], stdout=subprocess.PIPE) stdout, _ = p.communicate() -- 2.17.0
signature.asc
Description: OpenPGP digital signature