Add helper method for creating and opening archive object
commitdee8144ce5ca96ceca643d74fd6152ecf812f8af
authorDan McGee <dan@archlinux.org>
Mon, 14 Nov 2011 05:45:55 +0000 (13 23:45 -0600)
committerDan McGee <dan@archlinux.org>
Wed, 16 Nov 2011 20:51:06 +0000 (16 14:51 -0600)
tree9206036726557a195046ccb5bcf9eb796c6d47ae
parentf1ec3b9b10d1657412d6592180c56887c3a6ae20
Add helper method for creating and opening archive object

This moves the common setup code of about 5 different callers into one
method. Error messages will now be common and shared in all places;
several paths did not have any messages at all before.

In addition, we now pick an ideal block size for the archive read based
off the larger value of our default buffer size or the st.st_blksize
field. For a filesystem such as NFS, this is often much larger than the
default 8192- values such as 32768 and 131072 are common.

Signed-off-by: Dan McGee <dan@archlinux.org>
configure.ac
lib/libalpm/add.c
lib/libalpm/be_package.c
lib/libalpm/be_sync.c
lib/libalpm/util.c
lib/libalpm/util.h