summaryrefslogtreecommitdiff
path: root/src/librefetch/librefetch
diff options
context:
space:
mode:
Diffstat (limited to 'src/librefetch/librefetch')
-rwxr-xr-xsrc/librefetch/librefetch6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/librefetch/librefetch b/src/librefetch/librefetch
index 49159f5..d0bbf1b 100755
--- a/src/librefetch/librefetch
+++ b/src/librefetch/librefetch
@@ -259,7 +259,11 @@ makepkg_modify='
/create_package\(\) \{/,/^\}$/ {
/pkg_file=/d # allow us to set pkg_file
s/"?\$\{comp_files\[@\]\}"?// # do not include .{PKGINFO,INSTALL,CHANGELOG}
- s/bsdtar /&--format=ustar / # ustar, not pax
+ # This is long/gross. What it does:
+ # - pass --format=ustar to bsdtar, to inhibit it using the pax format
+ # - take the files that would be included in the tarball, and use
+ # find/sort/xargs to order them before passing them to bsdtar
+ s/bsdtar(.*) - ([^|]*) \|/find \2 -print0 | LC_ALL=C sort --zero-terminated | xargs -0 bsdtar --format=ustar --no-recursion \1 - |/
s/create_signature .*/&; return $?/ # do not procede to create symlinks
}