diff options
author | Allan McRae <allan@archlinux.org> | 2010-11-16 16:30:33 +1000 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-12-12 20:29:54 -0600 |
commit | e527699dddca41e3af6c1872e851405a4f5212a0 (patch) | |
tree | 06d8af93ba766f99ab386f9d168289a4f7ca5846 /configure.ac | |
parent | 695656d25279342f80c307035721ced6d37ee08b (diff) | |
download | pacman-e527699dddca41e3af6c1872e851405a4f5212a0.tar.xz |
Add functions to calculate approximate disk usage by packages
Two helper function are added to calculate the disk usage from packages
that are either currently installed on the system or from a package
archive.
Some minor approximations have been made:
1. Size for directories is not considered when removing a package from the
filesystem to avoid multiple counting across packages. Also, these are
reported to take zero size while installing.
2. Symlinks are reported to contribute zero size towards removal as
libarchive reports them to have zero size for install.
3. Package data files (.PKGINFO, .INSTALL, .CHANGELOG) are counted towards
usage on dbpath on install, but their size is not counted on package
removal.
4. No handling of extra size needed for .pacsave/.pacnew files.
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index cf023002..56e1ed88 100644 --- a/configure.ac +++ b/configure.ac @@ -133,6 +133,9 @@ AC_PATH_PROGS([BASH_SHELL], [bash bash4 bash3], [false]) AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION(0.13.1) +# Check for lm +AC_CHECK_LIB([m], [ceil]) + # Check for libarchive AC_CHECK_LIB([archive], [archive_read_data], , AC_MSG_ERROR([libarchive is needed to compile pacman!])) |