--- a/components/gzip/patches/znew.patch Thu Feb 12 08:27:28 2015 -0800
+++ b/components/gzip/patches/znew.patch Thu Jan 29 08:22:55 2015 -0800
@@ -90,7 +90,7 @@
for arg
do
[email protected]@ -116,26 +92,32 @@ if test -n "$opt"; then
[email protected]@ -116,26 +92,33 @@ if test -n "$opt"; then
fi
for i do
@@ -107,12 +107,13 @@
# Copy file attributes from old file to new one, if possible.
- test -n "$cpmod" && $cpmod $cpmodarg "$n.Z" "$n$ext" 2> /dev/null
+ touch -r"$n.Z" -- "$n$ext" 2>/dev/null
-+ python -c '
-+ import os
-+ import sys
-+ mode = os.stat(sys.argv[1]).st_mode & 07777
-+ os.chmod(sys.argv[2], mode)
-+ ' "$n.Z" "$n$ext"
++ python - "$n.Z" "$n$ext" <<-EOF
++ import os
++ import sys
++ import stat
++ mode = stat.S_IMODE(os.stat(sys.argv[1]).st_mode)
++ os.chmod(sys.argv[2], mode)
++ EOF
else
- echo error while recompressing $n.Z
+ echo "error while recompressing $n.Z"