summaryrefslogtreecommitdiffstats
path: root/pactest/pmpkg.py
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2007-02-27 09:32:52 +0100
committerAaron Griffin <aaron@archlinux.org>2007-02-27 09:32:52 +0100
commit512ccbd0426194dc86d12ee688b7f839721e4a11 (patch)
treec3ef33aba5fba1a78b94a44eb177af1493e7f92b /pactest/pmpkg.py
parent67ff30b869afd4fe2de484d7ce1d22b9bcebab3a (diff)
downloadpacman-512ccbd0426194dc86d12ee688b7f839721e4a11.tar.gz
pacman-512ccbd0426194dc86d12ee688b7f839721e4a11.tar.xz
* Fixed a pacman warning when these fake packages didn't create an (empty)
.FILELIST
Diffstat (limited to 'pactest/pmpkg.py')
-rwxr-xr-xpactest/pmpkg.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/pactest/pmpkg.py b/pactest/pmpkg.py
index 22adaeb8..cd12717a 100755
--- a/pactest/pmpkg.py
+++ b/pactest/pmpkg.py
@@ -156,9 +156,8 @@ class pmpkg:
# .INSTALL
empty = 1
- for value in self.install.values():
- if value:
- empty = 0
+ if len(self.install.values()) > 0:
+ empty = 0
if not empty:
mkinstallfile(".INSTALL", self.install)
targets += " .INSTALL"
@@ -166,7 +165,11 @@ class pmpkg:
# .FILELIST
if self.files:
os.system("tar cvf /dev/null * | sort >.FILELIST")
- 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 *"
# Generate package archive
os.system("tar zcf %s %s" % (archive, targets))