]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blobdiff - pakfire/patches/0012-buildroot-Only-copy-dev-nodes-if-they-really-exist.patch
pakfire: Sync with upstream.
[people/amarx/ipfire-3.x.git] / pakfire / patches / 0012-buildroot-Only-copy-dev-nodes-if-they-really-exist.patch
diff --git a/pakfire/patches/0012-buildroot-Only-copy-dev-nodes-if-they-really-exist.patch b/pakfire/patches/0012-buildroot-Only-copy-dev-nodes-if-they-really-exist.patch
new file mode 100644 (file)
index 0000000..23581f2
--- /dev/null
@@ -0,0 +1,30 @@
+From efffd953ca54809f1f7d0bb9269568477c660a6d Mon Sep 17 00:00:00 2001
+From: Michael Tremer <michael.tremer@ipfire.org>
+Date: Wed, 8 May 2013 20:50:11 +0000
+Subject: [PATCH 12/19] buildroot: Only copy dev nodes if they really exist.
+
+---
+ python/pakfire/builder.py | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/python/pakfire/builder.py b/python/pakfire/builder.py
+index 944c1a0..68c9fd4 100644
+--- a/python/pakfire/builder.py
++++ b/python/pakfire/builder.py
+@@ -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)
+-- 
+1.8.1.4
+