On Sun, 10 Apr 2011 14:22:40 +0100 Ciaran McCreesh <ciaran.mccre...@googlemail.com> wrote: > On Tue, 5 Apr 2011 22:33:48 +0400 > Yevgeniy Tumanov <zhenya....@gmail.com> wrote: > > After some investigation I found out that this is because on archive > > creation libarchive doesn’t like simple archive_entry_copy_stat call, > > it wants additionally explicit file size setting through > > archive_entry_set_size (but _unset_size also works). > > Weird. archive_entry_copy_stat does: > > archive_entry_set_size(entry, st->st_size); > > So something very odd is going on...
> > http://code.google.com/p/libarchive/source/browse/trunk/libarchive/archive_entry_copy_stat.c?r=2056 Yes, I see, it is there. But nevertheless, this is what I get: $ gcc -DCOMMENT_SET_SIZE -o create_archive_with_symlink create_archive_with_symlink.c -larchive && ./create_archive_with_symlink archive.pax.bz2 link archived_link && rm link file && { bsdtar -tvf archive.pax.bz2 ; echo result: $? ; } usage: ./create_archive_with_symlink ARCHIVE_NAME SYMLINK PATH_IN_ARCHIVE lrwxrwxrwx 0 builder 1021 0 Апр 10 21:09 archived_link -> file bsdtar: Truncated input file (needed 17592186044928 bytes, only 1024 available) bsdtar: Error exit delayed from previous errors. result: 1 $ gcc -o create_archive_with_symlink create_archive_with_symlink.c -larchive && ./create_archive_with_symlink archive.pax.bz2 link archived_link && rm link file && { bsdtar -tvf archive.pax.bz2 ; echo result: $? ; } usage: ./create_archive_with_symlink ARCHIVE_NAME SYMLINK PATH_IN_ARCHIVE lrwxrwxrwx 0 builder 1021 0 Апр 10 21:09 archived_link -> file result: 0 $ gcc -DCOMMENT_SET_SIZE -DREAD_DISK_ENTRY_FROM_FILE -o create_archive_with_symlink create_archive_with_symlink.c -larchive && ./create_archive_with_symlink archive.pax.bz2 link archived_link && rm link file && { bsdtar -tvf archive.pax.bz2 ; echo result: $? ; } usage: ./create_archive_with_symlink ARCHIVE_NAME SYMLINK PATH_IN_ARCHIVE lrwxrwxrwx 0 builder 1021 0 Апр 10 21:52 archived_link -> file result: 0 create_archive_with_symlink.c is the program from my letter on Tue, 5 Apr 2011 22:33:48 +0400. It just creates pax.bz2 archive and adds 1 symlink to it using libarchive. With -DCOMMENT_SET_SIZE archive_entry_set_size is not called. The given output is made after I have installed =libarchive-scm::ciaranm_gentoo (I added ~x86 to KEYWORDS in ebuild). Umm… I reinstalled paludis-0.60.3 for it to use /lib/libarchive.so.3 and now it creates good archives… Oh! It creates tar.bz2, not pax.bz2! (just in case: libarchive-2.8.4 gives /lib/libarchive.so.2) _______________________________________________ paludis-user mailing list paludis-user@lists.pioto.org http://lists.pioto.org/mailman/listinfo/paludis-user