Denis Corbin | 7 Oct 21:03
Picon
Favicon

frozen API


Hi All,

Just to let you know that current development code has been frozen for
its API specification. Still remains some documentation to review before
starting the pre-release phase, but all API related documentation are
updated (I still have to review them to fix probable bad spelling and
bad English phrases...)

Some words about the new API.

First, yes, it is a new API. But the old API (4.4.x version) is still
available through a compatibility wrapper included in libdar. So if you
do not want to take advantage of libdar's new features in your program
but want to be able to compile and link against the new API with a
minimum effort, you will have to include "libdar_4_4.hpp" in place of
"libdar.hpp" and use the namespace "libdar_4_4" in place of "libdar".
That's all. Compilation and linking stay the same.

Why yet a new API?

Mainly because for each new feature a new argument to a method somewhere
had to be added, which broke backward compatibility (see API version
4.4.x compared to major release version 2.4.x).

What are the changes between 4.4.x and 5.0.0 API?

Well, first, there is no more any method with a ton of arguments. This
should let code more readable and avoid argument mix. So now, how this
info get passed to libdar? Thanks to a new set of "option" classes.
(Continue reading)

Guido De Rosa | 14 Jan 22:31
Picon

low-level reading of file inside an archive?

Hi all,

is there a way to do something like this:

read n bytes at offset t of file path/to/my/file.ext inside a DAR
archive and put the result into a std::string or char* or something?

I would like to implement a read-only FUSE file system to look inside
DAR archives, and I need to perform this kind of basic I/O operations
without extracting real files to temporary  directories (and then make
the I/O on the file) because this would be highly inefficient.

Thank you very much!

--

-- 
Guido De Rosa

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
Thomas Jacob | 6 Sep 17:37
Picon
Favicon

catalogue/directory: sorted set instead of vector

Hey Dennis,

I have come across a performance issue in DAR 2.3.9 
that occurs if you archive directories with a huge number of
files in them (and possibly do on-the-fly-isolate,
haven't yet tested wether this is required for the
problem to occur).

Specifically, after gprofing the issue, the problem
seems to happen in the directory class defined in
catalogue.hpp/cpp which uses the STL vector template
to store an unsorted list of nommes, and this
list is often linearily searched to find out if
a given name is already present in the list,
with the obvious consequences if the list becomes
large.

I've replaced that with the sorted STL set template + std::string
< operator, which has much nicer performance characteristics
in this case, but internally sorts the elements and thus
when reading out the members of a directory
the order of elements will no longe be the same as when
they were added to this data structure.

Could this cause problems with some of DAR's features?
More specifically, is the order of the elements in the directory class
relevant for at least one part of DAR? If not, would you be interested
in a patch? Any specific requirements for a patch (at the moment
I am simply replacing the implementation without any extra autoconf
or runtime options to control this feature)
(Continue reading)

Sivakumar Selvam | 25 Jan 18:31
Picon
Favicon

Re: compiling the 64 bit libdar in AIX 5.3 platform

I am trying to compile the dar-2.3.6 source code in AIX 5.3 using "g++ -maix64"
and could not able to run the 64 bit dar command successfully. I had copied 
the dar dependency links below. Can you please help me to identify the problem?
 
bash-3.2# ldd dar
dar needs:
         /opt/freeware/64/lib/libc.a(shr_64.o)
         /usr/lib/libpthread.a(shr_xpg5_64.o)
         /usr/lib/libnsl.a(shr_64.o)
         /opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.3/ppc64/libstdc++.a(libstdc++.so.6)
         /opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.3/ppc64/libgcc_s.a(shr.o)
         /usr/sony/iTRx/siva/64bit/dec26/dar-2.3.6/src/libdar/.libs/libdar.a(libdar.so.4)
         /unix
         /usr/lib/libcrypt.a(shr_64.o)
         /usr/lib/libpthreads.a(shr_xpg5_64.o)
         /usr/lib/libtli.a(shr_64.o)
         /usr/lib/libC.a(shr2_64.o)
         /usr/lib/libC.a(shr3_64.o)
         /opt/freeware/64/lib/libbz2.a(libbz2.so.1)
         /opt/freeware/64/lib/libz.a(libz.so.1)
         /opt/freeware/64/lib/libcrypto.a(libcrypto.so.0.9.7)
         /opt/freeware/64/lib/libc.a(pse_64.o)
         /usr/lib/libC.a(shrcore_64.o)
         /usr/lib/libC.a(ansicore_64.o)
         /opt/freeware/64/lib/libc..a(shr.o)
         /usr/lib/libc_r.a(shr_64.o)
         /usr/lib/libcrypt.a(shr.o)
 
libdar library dependency links
 
bash-3.2# ldd libdar.so.4
libdar.so.4 needs:
         /usr/lib/libc.a(shr_64.o)
         /opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.3/../../../libbz2..a(libbz2.so.1)
         /opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.3/../../../libz.a(libz.so.1)
         /usr/lib/libpthread.a(shr_xpg5_64.o)
         /opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.3/../../../libcrypto.a(libcrypto.so.0.9..7)
         /unix
         /usr/lib/libcrypt.a(shr_64.o)
         /usr/lib/libc.a(shr.o)
         /usr/lib/libcrypt.a(shr.o)
bash-3.2#
 
truss dar command output:
 
kread(3, " . s v c _ i n s t r\0 s".., 4096)    = 4096
klseek(3, 0, 1, 0x0FFFFFFFFFFFE5E0)             = 0
klseek(3, 13589018, 0, 0x0FFFFFFFFFFFE5E0)      = 0
kread(3, "\0\0\0\0\0\0 71C\0\0 i ®".., 4096)    = 4096
klseek(3, 0, 1, 0x0FFFFFFFFFFFE600)             = 0
klseek(3, 0, 1, 0x0FFFFFFFFFFFE5E0)             = 0
klseek(3, 14572696, 0, 0x0FFFFFFFFFFFE5E0)      = 0
kread(3, " . s y s _ c a l l _ r e".., 4096)    = 4096
klseek(3, 0, 1, 0x0FFFFFFFFFFFE5E0)             = 0
klseek(3, 13589270, 0, 0x0FFFFFFFFFFFE5E0)      = 0
kread(3, "\0\0\0\0\0\0 8 0\0\0 j !".., 4096)    = 4096
klseek(3, 0, 1, 0x0FFFFFFFFFFFE600)             = 0
klseek(3, 0, 1, 0x0FFFFFFFFFFFE5E0)             = 0
klseek(3, 14580915, 0, 0x0FFFFFFFFFFFE5E0)      = 0
kread(3, " s c _ t r a c e _ e n d".., 4096)    = 4096
klseek(3, 0, 1, 0x0FFFFFFFFFFFE5E0)             = 0
klseek(3, 13589306, 0, 0x0FFFFFFFFFFFE5E0)      = 0
kread(3, "\0\0\0\0\0\0 8 P\0\0 j 4".., 4096)    = 4096
klseek(3, 0, 1, 0x0FFFFFFFFFFFE600)             = 0
klseek(3, 0, 1, 0x0FFFFFFFFFFFE5E0)             = 0
klseek(3, 14555222, 0, 0x0FFFFFFFFFFFE5E0)      = 0
kread(3, " v r s a v e _ p a t c h".., 4096)    = 4096
klseek(3, 0, 1, 0x0FFFFFFFFFFFE5E0)             = 0
klseek(3, 13589666, 0, 0x0FFFFFFFFFFFE5E0)      = 0
kread(3, "\0\0\0\0\0\0 =  \0\0 j Ù".., 4096)    = 4096
klseek(3, 0, 1, 0x0FFFFFFFFFFFE600)             = 0
klseek(3, 0, 1, 0x0FFFFFFFFFFFE5E0)             = 0
klseek(3, 14581099, 0, 0x0FFFFFFFFFFFE5E0)      = 0
kread(3, " c s c _ r e t _ h _ p u".., 4096)    = 4096
klseek(3, 0, 1, 0x0FFFFFFFFFFFE5E0)             = 0
klseek(3, 13589702, 0, 0x0FFFFFFFFFFFE5E0)      = 0
kread(3, "\0\0\0\0\0\0 > (\0\0 j î".., 4096)    = 4096
close(3)                                        = 0
    Received signal #4, SIGILL [default]
*** process killed ***

 Thanks,
Sivakumar Selvam.
From: Sivakumar Selvam <sks2008-ur4TIblo6goN+BqQ9rBEUg@public.gmane.org>
To: "Area available for the evolution, usage, support, feature requests, concerning the libdar API (application Interface)" <dar-libdar_api-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Sent: Wednesday, 14 January, 2009 1:59:45 PM
Subject: Re: [Dar-libdar_api] linking 32 bit libdar to a 64 bit application on AIX 64 bit platform

Thanks for your reply. This help me to understand the dependency issues across 32/64 bit libraries.
I want to know the other one which has to do with compiling libdar in 64 bit OS. I don't know whether
I can compile the libdar source code with -maix64 during compile time and add -X64 during creation
of libraries. During libdar compilation, I used 64 bit lintl lib which is part of  gettext open source code.
I modified the makefiles of gettext and libiconv to get into 64 bit mode. Did any one knows about 64 bit
libdar creation in AIX? Can I use -maix64 compilation flag? Please help me.

Thanks,
-Siva


From: Thomas Jacob <jacob-H4aWS73dXuq2ruNfRDi95w@public.gmane.org>
To: "Area available for the evolution, usage, support, feature requests, concerning the libdar API (application Interface)" <dar-libdar_api-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Sent: Monday, 12 January, 2009 3:10:04 AM
Subject: Re: [Dar-libdar_api] linking 32 bit libdar to a 64 bit application on AIX 64 bit platform

On Wed, 2009-01-07 at 01:01 +0530, Sivakumar Selvam wrote:
> Hi,
>    Is it possible to link the 32 bit libdar library with a 64 bit
> application on  64 bit AIX platform?

I don't know about AIX, but in Linux for instance, that's not possible,
easy to understand really, when you consider that the size of some data
types changes, but the libraries calling each other don't know that.

Remember that shared libraries usually do not contain any information
about function call parameters, just the start addresses of the
functions. So when one library pushes a 32 bit number onto the
stack and another tries to read a 64 bit number, there will be trouble.


>    Can I compile libdar source code using -maix64 compiler option?
> Since libdar uses libintl,
>    I need to compile the gettext and libiconv source codes using
> -maix64. If some one has
>    already tried this, I would like to know your suggestion.


> Thanks,
> -Siva.
>
>
> ______________________________________________________________________
> Unlimited freedom, unlimited storage. Get it now
> ------------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It is the best place to buy or sell services for
> just about anything Open Source.
> http://p.sf.net/sfu/Xq1LFB
> _______________________________________________ Dar-libdar_api mailing list Dar-libdar_api-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/dar-libdar_api


------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Dar-libdar_api mailing list
Dar-libdar_api-5NWGOfrQmnd4wTydcyPnfg@public.gmane.orgceforge.net
https://lists.sourceforge.net/lists/listinfo/dar-libdar_api

Add more friends to your messenger and enjoy! Invite them now.

Add more friends to your messenger and enjoy! Invite them now.
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Dar-libdar_api mailing list
Dar-libdar_api@...
https://lists.sourceforge.net/lists/listinfo/dar-libdar_api
Sivakumar Selvam | 6 Jan 20:31
Picon
Favicon

linking 32 bit libdar to a 64 bit application on AIX 64 bit platform

Hi,
    Is it possible to link the 32 bit libdar library with a 64 bit application on  64 bit AIX platform?
 
    Can I compile libdar source code using -maix64 compiler option? Since libdar uses libintl,
    I need to compile the gettext and libiconv source codes using -maix64. If some one has
    already tried this, I would like to know your suggestion.
 
 
Thanks,
-Siva.

Unlimited freedom, unlimited storage. Get it now
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Dar-libdar_api mailing list
Dar-libdar_api@...
https://lists.sourceforge.net/lists/listinfo/dar-libdar_api
Sascha Ochsenknecht | 27 Mar 19:26
Picon

Usage of masks for EA

Hello,

I'm currently working on KDar to make it work with the latest libdar 
release.

I'm struggling with the Extended Attributes (EA) and the libdar::mask to 
specify which EA to archive, restore etc.
The user should be able to switch on/off system and user EA, so I 
created the mask like this:

// --- snip ---

using namespace libdar;

et_mask mask;	// AND mask, should match if all added masks match

mask.add_mask(bool_mask(true));	// all EA

// ignore user EA
if ( !userEA() ) {
    mask.add_mask(not_mask(regular_mask("user.*", false)));
}

if ( !systemEA() ) {
    mask.add_mask(not_mask(regular_mask("system.*", false)));
}

// now use the mask to create/restore archive, e.g. archive::archive() 
archive::op_extract() ...
// --- snip ---

But the EA are always stored/restored, even when I try to filter out 
system and user EA.

Did I misunderstand something? Why it is not working as expected?

Thanks in advance,
Regards,
Sascha

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
Daniel Leonard | 4 Dec 00:45
Picon

Creating a new archive problem passing inode comparison field

Hi all,

I am starting out working with libdar. For fun / education I am hoping
to write a gtk based backup utility. To cut my teeth I decided to start
with the examples on the libdar API tutorial. I apologise if this is
something really obvious, but I am having problems with the following :-

 ==========

//creating a simple_mask object and constructing it.
libdar::simple_mask no_cmprs_ext = libdar::simple_mask("*gz", false);

libdar::simple_mask ignore_these = libdar::simple_mask("*~", true);

libdar::archive *my_arch =
     	new libdar::archive(dialog,
     	"/home/dan/tmp/dar-data",  // saving all under this "root"
     	"/tmp",   // where the slices will go
     	NULL,     // we do a full backup for now
     	libdar::not_mask(libdar::simple_mask(ignore_these)),
            // we don't save the files ending with
            // '~' this does not concern directories
     	libdar::bool_mask(true),
            // all directories and files not rejected
            // by the previous mask are saved
     	"dar-data", 
            // the basename of the slices
     	"dar", // dar's slice extensions
     	true,  // we allow slice overwriting
     	true,  // but ask to be warned in such occurrence
     	false, // we don't want a verbose output
     	0,     // nor do we want to pause between slices
     	true,  // rejected directories will be saved as
            // empty (no directory is rejected so
            // here there is no importance for that
            // parameter)
     	libdar::gzip, // the archive will be compressed
            // using gzip
     	9,     // at maximum compression level
     	0,     // no slicing is done,
     	0,     // so the first slice size must also be
            // set to zero
     	libdar::bool_mask(true),
            // save all EA
     	"",    // no script will be executed between
            // slices (as there is no slicing)
     	libdar::crypto_blowfish,
            // the blowfish strong encryption
            // will be used
     	"",    // as the password is not given here   
            // (empty string is not a valid password)
            // it will be queried interactively
            // through the dialog
            // user_interaction object
     	20480, // the block of encryption will be
            // 20 kbytes
     	libdar::not_mask(libdar::simple_mask(no_cmprs_ext)),
            // all files will be compressed except
            // those ending with "gz"
     	800,   // files whose sized is below 800 bytes
            // will not be compressed
     	false, // all files will be saved regardless of
            // the nodump flag value
     	cf_all,// useless here as we don't make a differential       
            // backup.
            // this field is used to define which fields have
            // to be considered to determine if a file has
            // changed since the arhive of reference
      	0,    // hourshift is useless here as we're making
            // a full backup
     	false, // we will make a real archive not a
            // dry-run operation
     	true,  // dar will set back the access time of
            // file it opens, which will change the
            // ctime date of theses files
     	false, // we may cross to other filesystems if
            // necessary
     	false, // we are not doing a snapshot of the filesystem
     	true,  // we don't save directories marked as caching
            // directory by some applications.
     	false, // we don't want to see the skipped files
     	0,     // we save all files not only those more recent
            // than a given date
     	&ret); // this value is returned by libdar
            // if you don't want to have statistics of the
            // operation you can set this parameter to NULL

	delete my_arch;

 ==========

The error I am getting is:-

make create_archive.o
g++ -DHAVE_CONFIG_H -I. -I.. -DPACKAGE_LOCALE_DIR=
\""/usr/local/share/locale"\" -DPACKAGE_SRC_DIR=\""."\"
-DPACKAGE_DATA_DIR=\""/usr/local/share"\"     -g -O2 -MT
create_archive.o -MD -MP -MF .deps/create_archive.Tpo -c -o
create_archive.o create_archive.cpp
create_archive.cpp: In function ‘void create_archive()’:
/home/dan/documents/code/cpp/Projects/read-dar/src/create_archive.cpp:140: error:
‘cf_all’ was not declared in this scope
make: *** [create_archive.o] Error 1
Completed... unsuccessful
Total time taken: 1 secs

Line 140 is the line where the inode comparison_fields type to compare
is being passed.

I have been reading the libdar API reference but have so far been unable
to figure it out. Any help would be very appreciated. Again I apologise
if this is a no brainer :-)

Thanks,
Dan.

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Dar-libdar_api mailing list
Dar-libdar_api <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dar-libdar_api
Adam Williamson | 15 Jun 22:43

Problem building current SVN kdar against dar 2.3.3

Hi, all. I am trying to build current SVN kdar for Mandriva. I know it's
not much use currently, but at the moment we have a package that's
entirely useless since it's built against libdar3, so anything would be
an improvement.

Anyway, the build fails because of an apparent problem in a libdar
header file. Does anyone know what the issue is here? Thanks!

[ 11%] Building CXX object
src/kdar_part/CMakeFiles/kdarpart.dir/kdar_part.o
/usr/bin/c++   -Dkdarpart_EXPORTS -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fomit-frame-pointer -march=i586 -mtune=generic
-fasynchronous-unwind-tables  -Wnon-virtual-dtor -Wno-long-long -ansi
-Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith
-Wformat-security -fno-exceptions -fno-check-new -fno-common
-fvisibility=hidden -O2 -g -fPIC
-I/home/adamw/rpm/BUILD/kdar/build/src/kdar_part
-I/home/adamw/rpm/BUILD/kdar/src/kdar_part -I/usr/lib/qt4/include
-I/usr/lib/qt4/include/Qt -I/usr/lib/qt4/mkspecs/default
-I/usr/lib/qt4/include/QtCore -I/usr/lib/qt4/include/QtGui
-I/usr/lib/qt4/include/Qt3Support -I/usr/lib/qt4/include/QtAssistant
-I/usr/lib/qt4/include/QtDesigner -I/usr/lib/qt4/include/QtNetwork
-I/usr/lib/qt4/include/QtOpenGL -I/usr/lib/qt4/include/QtSql
-I/usr/lib/qt4/include/QtXml -I/usr/lib/qt4/include/QtSvg
-I/usr/lib/qt4/include/QtScript -I/usr/lib/qt4/include/QtUiTools
-I/usr/lib/qt4/include/QtTest -I/usr/lib/qt4/include/QtDBus
-I/opt/kde4/include -I/opt/kde4/include/KDE -I/usr/local/include
-D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_GNU_SOURCE
-DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS
-fexceptions -DLIBDAR_MODE= -DVERSION=3.0 -DGCC_HASCLASSVISIBILITY
-fvisibility=default -o
src/kdar_part/CMakeFiles/kdarpart.dir/kdar_part.o
-c /home/adamw/rpm/BUILD/kdar/src/kdar_part/kdar_part.cpp
In file included from /usr/include/dar/compressor.hpp:32,
                 from /usr/include/dar/libdar.hpp:63,

from /home/adamw/rpm/BUILD/kdar/src/kdar_part/kdarbrowser.h:44,

from /home/adamw/rpm/BUILD/kdar/src/kdar_part/kdar_part.cpp:22:
/usr/include/dar/infinint.hpp:32:17: error: operator '==' has no left
operand
/usr/include/dar/infinint.hpp:37:17: error: operator '==' has no left
operand
/home/adamw/rpm/BUILD/kdar/src/kdar_part/kdar_part.cpp:246:6: warning:
#warning TODO how should we set the cursor state? Which widgets will
show the hourglass?
/usr/include/dar/storage.hpp:67: error: expected ',' or '...' before '&'
token
/usr/include/dar/storage.hpp:70: error: expected ',' or '...' before '&'
token
/usr/include/dar/storage.hpp:89: error: declaration of 'operator[]' as
non-function
/usr/include/dar/storage.hpp:89: error: expected ';' before '(' token
/usr/include/dar/storage.hpp:90: error: expected ',' or '...' before '&'
token
/usr/include/dar/storage.hpp:91: error: 'infinint' does not name a type
/usr/include/dar/storage.hpp:119: error: 'infinint' has not been
declared
/usr/include/dar/storage.hpp:120: error: 'infinint' does not name a type
/usr/include/dar/storage.hpp:174: error: 'infinint' has not been
declared
/usr/include/dar/storage.hpp:193: error: 'infinint' has not been
declared
/usr/include/dar/real_infinint.hpp: In member function 'libdar::infinint
libdar::infinint::get_storage_size() const':
/usr/include/dar/real_infinint.hpp:121: error: 'class libdar::storage'
has no member named 'size'
/home/adamw/rpm/BUILD/kdar/src/kdar_part/kdar_part.cpp: At global scope:
/home/adamw/rpm/BUILD/kdar/src/kdar_part/kdar_part.cpp:566: warning:
unused parameter 'archiveName'
/home/adamw/rpm/BUILD/kdar/src/kdar_part/kdar_part.cpp:574: warning:
unused parameter 'archiveName'
make[2]: *** [src/kdar_part/CMakeFiles/kdarpart.dir/kdar_part.o] Error 1
make[2]: Leaving directory `/home/adamw/rpm/BUILD/kdar/build'
make[1]: *** [src/kdar_part/CMakeFiles/kdarpart.dir/all] Error 2
make[1]: Leaving directory `/home/adamw/rpm/BUILD/kdar/build'
make: *** [all] Error 2
error: Bad exit status from /home/adamw/rpm/tmp/rpm-tmp.88093 (%build)
--

-- 
adamw

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Denis Corbin | 18 May 12:24
Picon
Favicon

more stability on libdar API


Hi,

For almost each added feature, I have to add new parameter(s) to the
archive class's constructors or methods. This is annoying for all
software that rely on libdar (dar command line programs, kdar, etc.).

This break ascendant compatibility at each major release, which implies
some work for each libdar dependent software.

I would like you to get your feedback about the following idea to solve
this problem:

The idea is very simple, replace the plethora of *optional* arguments
found in constructor and archive::op_* methods by a single one which type
is a class, class which name would be isolate_option, create_option,
extract_option, and so on.

All theses class would have a default constructor (with no argument),
along with a list of methods to set the different options (slicing,
encryption, compression, etc.). then, as new feature get added, a new
method of in theses option classes would be added. Not using this new
method would only let libdar behaves with default value for this new option.

Old software would continue to work with new libdar API and less work
would have to be done for libdar dependent software. Using a new feature
by libdar dependent programs could be done asynchronously from libdar's
release, this brings more freedom for anyone around libdar's API.

Thanks in advance for feedback,

Regards,
Denis.
Johnathan Burchill | 21 Apr 20:11
Favicon

Typos in compressor.cpp

Hi Denis,

The ERange source argument in "char compression2char(compression c)", around 
line 431 in compressor.cpp should be "compression2char", instead 
of "char2compression". Similar problem in "string 
compression2string(compession c)".

Cheers,
JB

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Johnathan Burchill | 21 Apr 05:17
Favicon

Empty option for testing archives

Hi Denis,

Is it possible to have the "empty" boolean option added to the 
libdar::archive->op_test() api? 

My plan is to use the "dummy run" option to quickly determine the number of 
files considered by an operation's selection and subtree filters, and at the 
same time in a different thread run the actual operation. Once the dummy 
operation is finished, and it returns the number of files considered, I can 
start to update my progress dialog based on the current stats of the running 
operation. The other operations have this empty option, but not the op_test.

Presumably op_test() with empty=true would traverse the archive according to 
the masks, and not perform the CRC checks.

Cheers,
JB

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

Gmane