]> git.ipfire.org Git - pakfire.git/commitdiff
packager: When adding the files to the archive we can only read xattrs from regular...
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 6 Feb 2011 13:37:44 +0000 (14:37 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 6 Feb 2011 13:37:44 +0000 (14:37 +0100)
pakfire/packages/packager.py

index afb316dc4b3e81ab4a9ff270b22e008d28fede56..e309c6091fc6614e4645b4e3ef17f52b8bb09f12 100644 (file)
@@ -150,10 +150,14 @@ class InnerTarFile(tarfile.TarFile):
                logging.debug("Adding file: %s" % tarinfo.name)
 
                filename = self.env.chrootPath(self.env.buildroot, tarinfo.name)
-               for attr, value in xattr.get_all(filename):
-                       tarinfo.pax_headers[attr] = value
 
-                       logging.debug("  xattr: %s=%s" % (attr, value))
+               # xattrs do only exists for regular files. If we don't have one,
+               # simply skip.
+               if os.path.isfile(filename):
+                       for attr, value in xattr.get_all(filename):
+                               tarinfo.pax_headers[attr] = value
+
+                               logging.debug("  xattr: %s=%s" % (attr, value))
 
                return tarinfo