diff options
author | Allan McRae <allan@archlinux.org> | 2014-06-12 04:50:15 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2014-06-12 04:50:15 +0200 |
commit | 537a335cc724a5c7c97824d33a2406b5dcea162d (patch) | |
tree | d9a18feb2e18506a0934f86d91df2f0ba980e067 /scripts/makepkg.sh.in | |
parent | 9ff6dc93afd2c09a0ca79d3d43c2d496c1416ef8 (diff) | |
download | pacman-537a335cc724a5c7c97824d33a2406b5dcea162d.tar.gz pacman-537a335cc724a5c7c97824d33a2406b5dcea162d.tar.xz |
Use C locale for bsdtar calls during package creation
This ensures packages build on a UTF-8 locale system with non-ASCII character
names can be installed on non-UTF-8 systems.
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r-- | scripts/makepkg.sh.in | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 4174ba58..e20b7072 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1998,7 +1998,7 @@ create_package() { shopt -s nullglob msg2 "$(gettext "Generating .MTREE file...")" - bsdtar -czf .MTREE --format=mtree \ + LANG=C bsdtar -czf .MTREE --format=mtree \ --options='!all,use-set,type,uid,gid,mode,time,size,md5,sha256,link' \ "${comp_files[@]}" * comp_files+=(".MTREE") @@ -2009,7 +2009,7 @@ create_package() { # bsdtar's gzip compression always saves the time stamp, making one # archive created using the same command line distinct from another. # Disable bsdtar compression and use gzip -n for now. - bsdtar -cf - "${comp_files[@]}" * | + LANG=C bsdtar -cf - "${comp_files[@]}" * | case "$PKGEXT" in *tar.gz) ${COMPRESSGZ[@]:-gzip -c -f -n} ;; *tar.bz2) ${COMPRESSBZ2[@]:-bzip2 -c -f} ;; @@ -2143,7 +2143,7 @@ create_srcpackage() { # tar it up msg2 "$(gettext "Compressing source package...")" cd_safe "${srclinks}" - if ! bsdtar -cL ${TAR_OPT} -f "$pkg_file" ${pkgbase}; then + if ! LANG=C bsdtar -cL ${TAR_OPT} -f "$pkg_file" ${pkgbase}; then error "$(gettext "Failed to create source package file.")" exit 1 # TODO: error code fi |