Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/pactest/pmpkg.py
diff options
context:
space:
mode:
Diffstat (limited to 'pactest/pmpkg.py')
-rwxr-xr-xpactest/pmpkg.py26
1 files changed, 19 insertions, 7 deletions
diff --git a/pactest/pmpkg.py b/pactest/pmpkg.py
index c302d2ae..7b8f81d0 100755
--- a/pactest/pmpkg.py
+++ b/pactest/pmpkg.py
@@ -53,7 +53,7 @@ class pmpkg:
self.force = 0 # sync only (will be moved to depends)
# depends
self.depends = []
- self.requiredby = [] # local only
+ self.optdepends = []
self.conflicts = []
self.provides = []
# files
@@ -146,6 +146,8 @@ class pmpkg:
data.append("group = %s" % i)
for i in self.depends:
data.append("depend = %s" % i)
+ for i in self.optdepends:
+ data.append("optdepend = %s" % i)
for i in self.conflicts:
data.append("conflict = %s" % i)
for i in self.provides:
@@ -165,13 +167,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))