Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-10-28 22:24:11 -0500
committerDan McGee <dan@archlinux.org>2007-10-28 22:24:11 -0500
commit671224b64c9478644125deec1496a27e8f579da9 (patch)
tree57f13df2f26fb869a7f3f14cf0a180fec4c49516
parent0dc34f496dca3d916eae85a0357049b8b9d711bb (diff)
pactest: generate the filelist the correct way
Actually use python commands to generate the filelist instead of os.system calls that don't necessarily work everywhere. Noticed when running "make check" on FreeBSD where the tar program is actually bsdtar. Signed-off-by: Dan McGee <dan@archlinux.org>
-rwxr-xr-xpactest/pmpkg.py22
1 files changed, 16 insertions, 6 deletions
diff --git a/pactest/pmpkg.py b/pactest/pmpkg.py
index c302d2ae..c6859e8f 100755
--- a/pactest/pmpkg.py
+++ b/pactest/pmpkg.py
@@ -165,13 +165,23 @@ class pmpkg:
# .FILELIST
if self.files:
- os.system("tar cvf /dev/null * | sort >.FILELIST")
+ # generate a filelist
+ filelist = []
+ current = ""
+ for path, dirs, files in os.walk("."):
+ # we have to strip the './' portion from the path
+ # and add a newline to each entry.
+ current = os.path.join(path, "")[2:]
+ if len(current) != 0:
+ filelist.append(current + "\n")
+ for file in files:
+ # skip .PKGINFO, etc.
+ if(not file.startswith(".")):
+ filelist.append(os.path.join(path, file)[2:] + "\n")
+ f = open('.FILELIST', 'w')
+ f.writelines(filelist)
+ f.close()
targets += " .FILELIST *"
- else:
- #prevent some pacman warnings... I expect a real package would
- #always have at least one file...
- os.system("touch .FILELIST")
- targets += " .FILELIST"
#safely create the dir
mkdir(os.path.dirname(self.path))