[Piuparts-commits] [piuparts] 03/06: Create ${ENV}/dev/null if it doesn't exist ASAP
Holger Levsen
holger at layer-acht.org
Thu Apr 12 18:21:25 UTC 2018
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch develop
in repository piuparts.
commit ffa4914a00b1b20cf17f7b5d1c8562e46bcec404
Author: Agustin Henze <tin at aayy.com.ar>
Date: Tue Apr 10 16:58:19 2018 -0300
Create ${ENV}/dev/null if it doesn't exist ASAP
Signed-off-by: Agustin Henze <tin at aayy.com.ar>
---
piuparts.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/piuparts.py b/piuparts.py
index 11bae67..d9a3428 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -1134,6 +1134,8 @@ class Chroot:
self.create_resolv_conf()
for bindmount in settings.bindmounts:
self.mount(bindmount, bindmount, opts="bind")
+ if not os.path.exists(self.name + '/dev/null'):
+ run(['mknod', '-m' ,'666', self.name + '/dev/null', 'c', '1', '3'])
def remember_available_md5(self):
"""Keep a history of 'apt-cache dumpavail | md5sum' after initial
@@ -1416,9 +1418,6 @@ class Chroot:
'broken-symlink',
]
ignored_tags = []
- if not os.path.exists(self.name + '/dev/null'):
- device = os.makedev(1, 3)
- os.mknod(self.name + '/dev/null', 0o666, device)
(status, output) = run(["adequate", "--root", self.name] + packages, ignore_errors=True)
for tag in ignored_tags:
# ignore some tags
--
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