summaryrefslogtreecommitdiff
path: root/test/pacman/pmpkg.py
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2013-04-14 14:32:19 -0400
committerAllan McRae <allan@archlinux.org>2013-04-15 11:25:18 +1000
commite19091b2bfe53cc1c37f2fc4999c359719637d7c (patch)
tree469a9d453c75a725d026e22afb2020a1299e8f94 /test/pacman/pmpkg.py
parent87acfef1669a3d6a185fde8c83535cb57bd3bbc5 (diff)
pmpkg: default mode 0755 for dirs in sync packages
TarInfo objects default to mode 0644 while mkfile in util.py uses 0755 for directories, causing pacman warnings about differing permissions on tests involving package updates. Set the mode on TarInfo directory objects to 0755 unless the test specifies a different mode. Bug referenced in FS#30723. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'test/pacman/pmpkg.py')
-rw-r--r--test/pacman/pmpkg.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/pacman/pmpkg.py b/test/pacman/pmpkg.py
index 988c73f3..9b3147a3 100644
--- a/test/pacman/pmpkg.py
+++ b/test/pacman/pmpkg.py
@@ -160,6 +160,8 @@ class pmpkg(object):
info = tarfile.TarInfo(fileinfo["filename"])
if fileinfo["hasperms"]:
info.mode = fileinfo["perms"]
+ elif fileinfo["isdir"]:
+ info.mode = 0755
if fileinfo["isdir"]:
info.type = tarfile.DIRTYPE
tar.addfile(info)