bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] [tar-1.14] including a lot of nested directories


From: TAMUKI Shoichi
Subject: [Bug-tar] [tar-1.14] including a lot of nested directories
Date: Fri, 04 Feb 2005 17:02:08 +0900

Hello,

The tar archive files created by tar-1.14, which include a lot of
nested directories, are made twice of same contents.  However, they
are binarily different each other.  I looked into their files and
found that the kind of attribute data of @LongLink seems to be
different.

If they are created by both tar-1.13.25 and tar-1.15.1, they are
binarily same each other.

For example, there are sample shell scripts, which can reproduce
the problem mentioned above:

[mklongpath.sh]
----------------------------------------------------------------------
#!/bin/sh
target="longpath"
if [ -e $target ] ; then
  rm -rf $target
fi
pushd .
pname="$target"
mkdir $target
cd $target
for i in `seq 25` ; do
  nextdir=`echo -n $i | awk '{printf("%07d", $1)}'`
  pname="$pname/$nextdir"
  mkdir $nextdir
  cd $nextdir
done
popd
for i in `seq 10` ; do
  echo -n $i | awk '{printf("%07d\n", $1)}' > $pname/$i
done
~/src/tar-1.15.1/src/tar cpf $target.tar $target
rm -rf $target
----------------------------------------------------------------------

[iolongpath.sh]
----------------------------------------------------------------------
#!/bin/sh
target="longpath"
if [ -e $target ] ; then
  rm -rf $target
fi
~/src/tar-1.15.1/src/tar xpf $target.tar
~/src/tar-1.15.1/src/tar cpf ${target}2.tar $target
rm -rf $target
if cmp -s $target.tar ${target}2.tar ; then
  echo "$target: same"
else
  echo "$target: differ"
fi
----------------------------------------------------------------------

First, run mklongpath.sh, then second, run iolongpath.sh.

The results are below:

tar version     results
------------------------
tar-1.13.25     same
tar-1.14        differ
tar-1.15.1      same
------------------------

If they do not include a lot of nested directories, the tar archive
files created by all tar versions, they are binarily same each other.

Now, I have some questions:

  - Why are their files created by tar-1.13 binarily different?
  - Is there any ideas what influence occurs caused by the difference?
  - tar-1.15.1 seems to work fine.  So, where are the revision parts
    to make a backport patch for tar-1.14?

Thank you for your cooperation.

Regards,
TAMUKI Shoichi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]