From: Michael Tremer Date: Sun, 6 Feb 2011 13:37:44 +0000 (+0100) Subject: packager: When adding the files to the archive we can only read xattrs from regular... X-Git-Tag: 0.9.3~210 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f2980a998820226b048345c8f4d04637a9600a1;p=pakfire.git packager: When adding the files to the archive we can only read xattrs from regular files. --- diff --git a/pakfire/packages/packager.py b/pakfire/packages/packager.py index afb316dc4..e309c6091 100644 --- a/pakfire/packages/packager.py +++ b/pakfire/packages/packager.py @@ -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