tags 402179 + patch upstream fixed-upstream
thanks

Attached is the diff for tests/append02 between upstream released
versions 1.16 and 1.16.1.
This patch should fix the problem. I guess the opotions are to aply
this patch to 1.16 or package 1.16.1. I guess applying the patch is
the better option if we wnat to fix this for etch.

The only testing of this patch I have done is by runing the
following... probably someone else should confirm the fix!

This script should prove the point runing essentially the same code
stand alone... based on the eariler stand alone code in this bug
report

---8<---
#!/bin/sh

# Make sure file timestamps in the archive will not differ
MTIME="[EMAIL PROTECTED]"

export TAR_OPTIONS="-H posix
--pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"

echo hello > file1
echo goodbye > file2

while :; do
 tar $MTIME -cf archive.1 file1 file2

 tar $MTIME -cf archive.2 -T /dev/null
 tar $MTIME -rf archive.2 file1
 tar $MTIME -rf archive.2 file2

 if cmp archive.1 archive.2 >/dev/null; then
   echo -n .
 else
   echo -n +
 fi
done
---8<---

Regards
Alex Owen
--- tar-1.16/tests/append02.at	2006-07-24 10:09:30.000000000 +0100
+++ tar-1.16.1/tests/append02.at	2006-11-13 09:17:46.000000000 +0000
@@ -44,19 +44,22 @@
 genfile --file file1
 genfile --file file2
 
+# Make sure file timestamps in the archive will not differ
+MTIME="[EMAIL PROTECTED]"
+
 # For PAX archives, we need to make sure extended header names are
-# reproducible.
+# reproducible and that their contents won't change with time 
 if test $[]TEST_TAR_FORMAT = posix; then
-  TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f"
+  TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
 fi
 
 echo Creating archive.1
-tar cf archive.1 file1 file2
+tar $MTIME -cf archive.1 file1 file2
 
 echo Creating archive.2
-tar cfT archive.2 /dev/null
-tar rf archive.2 file1
-tar rf archive.2 file2
+tar $MTIME -cf archive.2 -T /dev/null
+tar $MTIME -rf archive.2 file1
+tar $MTIME -rf archive.2 file2
 
 echo Comparing archives
 cmp archive.1 archive.2

Reply via email to