[pacman-dev] [PATCH 1/2] pmpkg: default mode 0755 for dirs in sync packages

Andrew Gregory andrew.gregory.8 at gmail.com
Sun Apr 14 14:32:19 EDT 2013


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 at gmail.com>
---
 test/pacman/pmpkg.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/pacman/pmpkg.py b/test/pacman/pmpkg.py
index 988c73f..9b3147a 100644
--- a/test/pacman/pmpkg.py
+++ b/test/pacman/pmpkg.py
@@ -160,6 +160,8 @@ def makepkg(self, path):
             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)
-- 
1.8.2.1



More information about the pacman-dev mailing list