summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/util.c
diff options
context:
space:
mode:
authorXavier Chantry <shiningxc@gmail.com>2009-10-09 19:11:27 +0200
committerDan McGee <dan@archlinux.org>2010-03-15 01:12:24 +0100
commit2f4ee4341d1f97d95a99147556888212d1cd4507 (patch)
tree28c58cae497b6992f99ffb8af22dcd85cc6ef9e3 /lib/libalpm/util.c
parent69b3a811a138a84aa09e8e81b2912f6fcd0b47b9 (diff)
downloadpacman-2f4ee4341d1f97d95a99147556888212d1cd4507.tar.gz
pacman-2f4ee4341d1f97d95a99147556888212d1cd4507.tar.xz
Only extract new DB entries
This implements FS#15198. The idea apparently came from Csaba Henk <csaba-ml <at> creo.hu> which submitted a patch to Frugalware, so thanks to him, even though I did not look at the code :) The idea is to only extract folders for new packages into the package database and clean up the old directories. This is essentially implementing Xyne's "rebase" script within pacman. If using -Syy, just remove and extract everything. If using -Sy : 1. Generate list of directories in DB 2. Generate list of directories in archive 3. Compare both 4. Clean up old directories 5. Extract new directories Original-work-by: Allan McRae <allan@archlinux.org> Signed-off-by: Xavier Chantry <shiningxc@gmail.com> [Dan: fix compile error, s/int/size_t/] Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/util.c')
-rw-r--r--lib/libalpm/util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 27e861e4..d290e71c 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -333,12 +333,13 @@ int _alpm_unpack(const char *archive, const char *prefix, alpm_list_t *list, int
char *found = alpm_list_find_str(list, prefix);
free(prefix);
if(!found) {
- _alpm_log(PM_LOG_DEBUG, "skipping: %s\n", entryname);
if (archive_read_data_skip(_archive) != ARCHIVE_OK) {
ret = 1;
goto cleanup;
}
continue;
+ } else {
+ _alpm_log(PM_LOG_DEBUG, "extracting: %s\n", entryname);
}
}