This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygwin dll makes gnu tar think that directories have been renamed?


I've had a similar problem. Here's some more detail, and what I found when
I looked into the problem...

With the tar executable from the tar-1.13.25-1 binary package,
listed-incremental backups work as expected:

ichthus$ mkdir test
ichthus$ touch test/foobar
ichthus$ mkdir test/foo
ichthus$ touch test/foo/bar
ichthus$ tar --verbose --listed-incremental=list -cf archive.tar test
tar: test/foo: Directory is new
test/
test/foo/
test/foobar
test/foo/bar
ichthus$ tar --verbose --listed-incremental=list -cf archive.tar test
test/
test/foo/
ichthus$ cat list
1066902650
23317 921534 test/foo

...all the files are backed up first time round, and none are the second
time round.

With the tar-1.13.25-3 package tar executable, or an executable built from
the tar-1.13.25-3 or tar-1.13.25-1 sources packages, the following occurs:

ichthus$ rm list
ichthus$ /usr/src/tar-1.13.25-3/src/tar --verbose \
--listed-incremental=list -cf archive.tar test
/usr/src/tar-1.13.25-3/src/tar: test/foo: Directory is new
test/
test/foo/
test/foobar
test/foo/bar
ichthus$ /usr/src/tar-1.13.25-3/src/tar --verbose \
--listed-incremental=list -cf archive.tar test
/usr/src/tar-1.13.25-3/src/tar: test/foo: Directory has been renamed
test/
test/foo/
test/foo/bar
ichthus$ cat list
1066903009
+3160087061 4030 test/foo

I.e., the second time the command is run, all the files in the
subdirectories of the base directory are stored in the incremental
archive, even if they haven't changed. Files in the base directory are
handled OK.

The problem is presumably caused by a recent change in the cygwin dll (or
perhaps the compiler), since the source code for the tar-1.13.25-3 and
tar-1.13.25-1 packages are effectively identical (the -3 package has an
extra configure.ac.orig file). Unfortunately, I couldn't find the
announcement messages for the packages in the mailing lists, so I wasn't
able to work out when they were released.

Running tar under insight, and stepping throught the code in incremen.c
shows that the "Directory has been renamed" message is displayed because
the following test fails:

directory->inode_number == stat_data.st_ino

Perhaps the problem is due to the recent migration of ino_t to 64 bits?
The values displayed during debugging, and the value of +3160087061 shown
above in the list file for the bugged version of tar, suggests that this
is a data type problem. Elsewhere in incremen.c, the code seems to assume
that ino_t has type unsigned long.

Jeremy

Attachment: cygcheck.out
Description: Text document

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]