retitle 466771 busybox cpio: does not unpack hardlinks to empty files thanks
Testing this out with the new busybox-static 1.9.2-1 from unstable, it appears that most hardlinks *are* actually unpacked, with the exception of zero-byte files that are linked to more than once. [0 [EMAIL PROTECTED] cdtemp.h29208]$ mkdir test [0 [EMAIL PROTECTED] cdtemp.h29208]$ touch test/solo [0 [EMAIL PROTECTED] cdtemp.h29208]$ touch test/empty [0 [EMAIL PROTECTED] cdtemp.h29208]$ echo -n x >test/nonempty [0 [EMAIL PROTECTED] cdtemp.h29208]$ ln test/empty test/empty1 [0 [EMAIL PROTECTED] cdtemp.h29208]$ ln test/nonempty test/nonempty1 [0 [EMAIL PROTECTED] cdtemp.h29208]$ mkdir z [0 [EMAIL PROTECTED] cdtemp.h29208]$ find test | cpio -H newc --create | (cd z && ../bin/busybox cpio -i) Using fallback suid method 2 blocks 2 blocks cpio: test/empty not created: cannot resolve hardlink cpio: test/empty1 not created: cannot resolve hardlink [0 [EMAIL PROTECTED] cdtemp.h29208]$ This appears to be because archival/libunarchive/get_header_cpio.c:134 assumes that a zero-byte regular file with nlink > 1 must refer to the contents of some other nonempty file yet to be extracted, which clearly isn't the case if the original file itself was zero bytes in length. Thanks for busybox in debian! --dkg
pgpo9qYjO7yMV.pgp
Description: PGP signature