Hi Erik, Sorry for the late reply, looks like I did not notice these bug mail messages the first time among the spam..
Yes, I confirm that this is either a bug or an undocumented shortcoming, depending on how you look at it. As to the why: the -r code was not written to perform a 100% solid comparison, its main purpose is to discover bit errors on the backup medium. The manpage already has something about this: The -r option verifies the file contents of the files in the archive against the files on the filesystem, but does not cross-check details like permission bits on files, nor does it cross-check that archived directories or other non-file entities still exist on the filesystem. but this warning should be extended I guess. A fix would be to stat() the file on the filesystem when the file in the archive has 0 length. Cheers, Koen. On Wed, 13 Jan 2010, Erik Schanze wrote: > > Hi Koen, > > [please keep at least 565202-forwar...@bugs.debian.org in CC:] > > a Debian user has filed a bugreport against Afio, please see below. > It seems the problem is, that empty files within Afio archive will not > be checked against file system. > > See afio.c:2938 > ----------8<----------------------------------------8<-------------------- > case S_IFREG: > /* does not check file permissions and access times */ > if (asb->sb_size == 0) > return (0); > ----------8<----------------------------------------8<-------------------- > > Is this intended behavior? > If yes, why? And we should document it clearly, I think. > > Thank you in advance. > > Bye, > Erik > > Christian Schneider Christian Schneider <chschnei...@nurfuerspam.de>: > > Package: afio > > Version: 2.5-5 > > Severity: important > > > > Hi folks, > > > > seems to me, as if the verification of afio archives against the > > filesystem does not work: > > > > $ mkdir foo > > $ touch foo/A > > $ find foo/ | afio -o bar.afio > > $ afio -r bar.afio > > $ echo $? > > 0 > > $ echo "baz" >> foo/A > > $ afio -r bar.afio > > $ echo $? > > 0 > > > > Returns "0" twice!? This is quite severe IMHO. Can you verify this? > > > > Thanks in advance. > > > > Regards, > > Christian > > > > -- System Information: > > Debian Release: 5.0.3 > > APT prefers stable > > APT policy: (500, 'stable') > > Architecture: amd64 (x86_64) > > > > Kernel: Linux 2.6.26-2-amd64 (SMP w/4 CPU cores) > > Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) > > Shell: /bin/sh linked to /bin/bash > > > > Versions of packages afio depends on: > > ii libc6 2.7-18 GNU C Library: Shared > > libraries > > > > afio recommends no packages. > > > > afio suggests no packages. > > > > -- no debconf information > > > > > > > > > -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org