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>
This commit is contained in:
parent
87acfef166
commit
e19091b2bf
1 changed files with 2 additions and 0 deletions
|
@ -160,6 +160,8 @@ class pmpkg(object):
|
||||||
info = tarfile.TarInfo(fileinfo["filename"])
|
info = tarfile.TarInfo(fileinfo["filename"])
|
||||||
if fileinfo["hasperms"]:
|
if fileinfo["hasperms"]:
|
||||||
info.mode = fileinfo["perms"]
|
info.mode = fileinfo["perms"]
|
||||||
|
elif fileinfo["isdir"]:
|
||||||
|
info.mode = 0755
|
||||||
if fileinfo["isdir"]:
|
if fileinfo["isdir"]:
|
||||||
info.type = tarfile.DIRTYPE
|
info.type = tarfile.DIRTYPE
|
||||||
tar.addfile(info)
|
tar.addfile(info)
|
||||||
|
|
Loading…
Add table
Reference in a new issue