summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2019-11-12 07:14:57 +0100
committerAndrew Gregory <andrew@archlinux.org>2020-01-10 08:19:47 +0100
commit019f9386ef2c85b4c3c9f9293f462cfb5ddcaa32 (patch)
tree261ca591e38df083499e7c9f797f2399e6d6ac3e
parentf6564377a2b0a0dd6294fb366a3f91a31142e124 (diff)
downloadpacman-019f9386ef2c85b4c3c9f9293f462cfb5ddcaa32.tar.gz
pacman-019f9386ef2c85b4c3c9f9293f462cfb5ddcaa32.tar.xz
pactest: set package tar format to GNU_FORMAT
python-3.8 changed the default tar format to PAX_FORMAT. This caused issues in our testsuite with package extraction of files with UTF-8 characters as we run the tests under the C locale. sycn600.py: error: error while reading package /tmp/pactest-xuhri4xa/var/cache/pacman/pkg/unicodechars-2.0-1.pkg.tar.gz: Pathname can't be converted from UTF-8 to current locale. Set format back to GNU_FORMAT. Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit b9faf652735c603d1bdf849a570185eb721f11c1)
-rw-r--r--test/pacman/pmpkg.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/pacman/pmpkg.py b/test/pacman/pmpkg.py
index 6a845222..e40868cc 100644
--- a/test/pacman/pmpkg.py
+++ b/test/pacman/pmpkg.py
@@ -142,7 +142,7 @@ class pmpkg(object):
util.mkdir(os.path.dirname(self.path))
# Generate package metadata
- tar = tarfile.open(self.path, "w:gz")
+ tar = tarfile.open(self.path, "w:gz", format=tarfile.GNU_FORMAT)
for name, data in archive_files:
info = tarfile.TarInfo(name)
info.size = len(data)