Re: libdar::user_interaction::listing splitting the flag argument

Denis Corbin <[email protected]> Mon, 28 Oct 2013 20:10:28 +0100
Newsgroups gmane.comp.sysutils.backup.dar.libdar
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le 28/10/2013 17:12, Tobias wrote:
> Hi Denis,

Hello Tobias,

> 
> Thank you very much for the back-port!
> That's the function I was looking for.
> 
> I have compiled libdar from git.
> By the way, it seems like a #endif in the libdar_config.h include file
> is missing:
>> #ifndef _DARWIN_USE_64_BIT_INODE
>> # define _DARWIN_USE_64_BIT_INODE 1
> + #endif

Could not reproduce this from the installed data I get here, but I think
I have found the cause. Normally only DAR related macro are present in
this file, I've changed the filter for "DARWIN" to not match the
DAR/LIBDAR macro filtering. Thanks to tell me if you have further
problem or not.

> 
> Unluckily I can list only the root directory ("") of the archive. 
> When requesting a subdirectory I get an Exception:
> "subdri/ entry does not exist"
> Calling get_children_of within the same archive is working as usual.
> Can you reproduce this behavior?

yes I could, I had just back-ported the initial patch about this feature
and forgot that subsequent patches were fixing several bugs about that
new feature. Now, it works better for me, and I hope for you too.

> 
> Can I only use the get_children_in_table method when working with
> archives that had been created with the current git release?

No, it should work for any archive even for archives generated by dar
release 1.0.0 more than 11 years ago :)  Please pay attention to call
archive::init_catalogue() once after the archive has been built and
before calling get_children_in_table() the first time on that archive.

init_catalogue() loads the catalogue in memory when it is not already
done. The catalogue is not loaded only when reading an archive in
sequential mode before any action has been asked on that archive, as the
contents in learned along the archive being read ... sequentially

But you have not to call init_catalogue() if you want to
extract/diff/test the archive before exploring the archive contents: In
sequential read mode, the access to the archive cannot be done twice so
either you do an operation on the archive (like extracting some files)
which finally builds up the catalogue in memory once the operation is
completed, or you call init_catalogue() which read the whole archive in
order to build the catalogue in memory without doing anything else on
about file's data or EA (just skipping over it).

if not in sequential read mode, init_catalogue() does nothing and it
does not hurt to call it anyway before calling get_children_in_table()
to be sure the catalogue has been built in memory.

> When opening other archives and calling get_children_in_table I ran into
> an Exception: 
> "it seems to be a bug here"
> 
> 
> Regards,
> Tobias
> 

Regards,
Denis.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIVAwUBUm62pAgxsL0D2LGCAQIcwBAAtMtqCj+/MN54QRMq4mVbCP67Il/s8Wjf
8egptIb/a4qGiXUyAd+VAfafkIHGtXThfgIeJwcjIoTRtfMtFs8BiN7TfCpsothC
MsyKfXxL689+bhTVgTNf+04D5Tl6TK7rjWFWfuRRcyaeOlVQ8KYd0km9CGAA8i0K
hf4zwfpZS4jGI6TAir3yeyQ1lzjgnP9qSQd4Dom0Rjav7Lo03LOBzkUTXhyqowfi
mLNA8/q+sWccTV3FcPlOsQIc7vL09mvR9ZgH4oZ+7nTPGLhloJ3gNH8JMjuwDxvB
EJEl6OOg40LVmGbxwm82ZjnLN+U+paZDgJC/D2zNyuQATsgpeKuBwGKqrrG8fQ0y
MCrJE1NrwhK2uM/2N6V4pnTfBkN8nmxVepnwwpTBRRajXhBLzDw3bISnUpDpfy42
CslQRjSNJ/Rs/whFS/sfXDzmhqPKqP7xnY9R6tXuzN3ZJ/1pYomGeY7P4pqBojSc
kyo/VyG7Vgaa/XEma7uaKqlQKpEB05WAsiFBpnWPsf/bHl1StbTJT7hz6bbTYtR6
auxGmdgoyde+GL9Ubrv/8bk/PE3aLuJ4RP2yrMaiI1iwUleqxM+ks8HsT4kMtvUt
anHst6+TyS4rIgHhIa3mlrsv9XdHwBAH9Zww1DPzl22RglPIpN6kf9lGidHAFHYh
h3WYWQJh3sM=
=snl+
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk