mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
Make testsuite python-2.7 compatible
os.walk(".") adds a prefix of "./" to filenames in python-2.7 which causes libalpm not to like archives generated in the testsuite resulting in widespread failure. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
fd38319106
commit
302188b169
@ -164,14 +164,8 @@ class pmpkg:
|
||||
|
||||
# Generate package archive
|
||||
tar = tarfile.open(self.path, "w:gz")
|
||||
|
||||
# package files
|
||||
for root, dirs, files in os.walk('.'):
|
||||
for d in dirs:
|
||||
tar.add(os.path.join(root, d), recursive=False)
|
||||
for f in files:
|
||||
tar.add(os.path.join(root, f))
|
||||
|
||||
for i in os.listdir("."):
|
||||
tar.add(i)
|
||||
tar.close()
|
||||
|
||||
os.chdir(curdir)
|
||||
|
Loading…
Reference in New Issue
Block a user