]> git.ipfire.org Git - pakfire.git/commitdiff
buildroot: Only copy dev nodes if they really exist.
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 8 May 2013 20:50:11 +0000 (20:50 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 8 May 2013 20:50:11 +0000 (20:50 +0000)
python/pakfire/builder.py

index 944c1a03d980b5361b2e3a4597c1d9326e3473eb..68c9fd4b45d224e5b7df526478b46a7da2705e45 100644 (file)
@@ -501,7 +501,12 @@ class BuildEnviron(object):
                for node in nodes:
                        # Stat the original node of the host system and copy it to
                        # the build chroot.
-                       node_stat = os.stat(node)
+                       try:
+                               node_stat = os.stat(node)
+
+                       # If it cannot be found, just go on.
+                       except OSError:
+                               continue
 
                        self._create_node(node, node_stat.st_mode, node_stat.st_rdev)