]> git.ipfire.org Git - pakfire.git/commitdiff
Revert "Convert all files in a source tarball to owner root."
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 12 Dec 2011 00:07:05 +0000 (01:07 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 12 Dec 2011 00:07:05 +0000 (01:07 +0100)
This reverts commit b47897ca161e9e28149b10b05b396173f8c89767.

Files had no content in the end, although it fixes the ownership
issue. :D

python/pakfire/packages/packager.py

index d17f7d38d1e62eab85b27a41ceb7117b4257c9a4..282696292d6ae0aaa338707f2a4ac182344175a4 100644 (file)
@@ -622,17 +622,7 @@ class SourcePackager(Packager):
                # Add all files in the package directory.
                for file in sorted(self.pkg.files):
                        arcname = os.path.relpath(file, self.pkg.path)
-
-                       # Get tarinfo from file that is to be added.
-                       tarinfo = datafile.gettarinfo(file, arcname)
-
-                       # Modify owner/group of the file. All source files belong
-                       # to root (at least in this package).
-                       tarinfo.uname = tarinfo.gname = "root"
-                       tarinfo.uid = tarinfo.gid = 0
-
-                       # Add file to tarball.
-                       datafile.addfile(tarinfo)
+                       datafile.add(file, arcname)
 
                datafile.close()