bug-gnu-utils
[Top][All Lists]
Advanced

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

tar --compare always fail on archive created with --listed-incremental


From: Andrey N. Kalinin
Subject: tar --compare always fail on archive created with --listed-incremental
Date: Mon, 1 Jul 2002 18:38:53 -0500

If archive is created using --listed-incremental option with existing list
file, archive verification will fail.

Script to reproduce issue:
-------------------------------------------
mkdir test
mkdir test/d1 test/d2
mkdir test/d1/d11 test/d2/d21
echo t > test/d1/f1
echo t > test/d2/f2
echo t > test/d2/d21/f21
echo t > test/d2/d21/f22

tar -cvf t.tar -g t.sf test

touch test/d2/d21/f22

tar -cvf t2.tar -g t.sf test

tar dvf t2.tar || echo Verification failed.
-------------------------------------------

tar fails when comparing directories. As a workaround I commented-out this
code in compare.c:
-------------------------------------------
process_dumpdir (size_t bytes, char *buffer)
{
/*  if (memcmp (buffer, dumpdir_cursor, bytes))
    {
      report_difference (_("Contents differ"));
      return 0;
    }
*/
  dumpdir_cursor += bytes;
  return 1;
}
-------------------------------------------

If there is a better solution, please advise.


Andrey.





reply via email to

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