[kupfer] wscript: Fix uname/gname for files in dist tarball



commit 033c891310890cd679d06e0ef5b7fc15779364cb
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Wed Mar 23 00:45:21 2011 +0100

    wscript: Fix uname/gname for files in dist tarball

 wscript |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/wscript b/wscript
index c1ae5ec..218b778 100644
--- a/wscript
+++ b/wscript
@@ -68,7 +68,13 @@ def _tarfile_append_as(tarname, filename, destname):
 	import tarfile
 	tf = tarfile.TarFile.open(tarname, "a")
 	try:
-		tf.add(filename, destname)
+		tarinfo = tf.gettarinfo(name=filename, arcname=destname)
+		tarinfo.uid = 0
+		tarinfo.gid = 0
+		tarinfo.uname = "root"
+		tarinfo.gname = "root"
+		with open(filename, "rb") as f:
+			tf.addfile(tarinfo, f)
 	finally:
 		tf.close()
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]