Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2015-06-17 22:27:50 +1000
committerAllan McRae <allan@archlinux.org>2015-07-15 10:57:30 +1000
commitb0dac754d27b45e4346b010e674f7faa466e0025 (patch)
treed38b623c7c74d9474626ba17ae4a58c8e4b8745e /src
parent289fdf0d1d9c88f0c8a6502cc311599c63a04723 (diff)
Add pacman support for .files databases
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/callback.c2
-rw-r--r--src/pacman/sync.c8
2 files changed, 7 insertions, 3 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 1f086755..9260ece9 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -750,7 +750,7 @@ void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total)
fname = malloc(len + 1);
memcpy(fname, filename, len);
/* strip package or DB extension for cleaner look */
- if((p = strstr(fname, ".pkg")) || (p = strstr(fname, ".db"))) {
+ if((p = strstr(fname, ".pkg")) || (p = strstr(fname, ".db")) || (p = strstr(fname, ".files"))) {
/* tack on a .sig suffix for signatures */
if(memcmp(&filename[len - 4], ".sig", 4) == 0) {
memcpy(p, ".sig", 4);
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 9dbaac80..f28ffbd9 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -102,6 +102,10 @@ static int sync_cleandb(const char *dbpath)
dbname = strndup(dname, len - 3);
} else if(len > 7 && strcmp(dname + len - 7, ".db.sig") == 0) {
dbname = strndup(dname, len - 7);
+ } else if(len > 6 && strcmp(dname + len - 6, ".files") == 0) {
+ dbname = strndup(dname, len - 6);
+ } else if(len > 6 && strcmp(dname + len - 6, ".files.sig") == 0) {
+ dbname = strndup(dname, len - 10);
} else {
ret += unlink_verbose(path, 0);
continue;
@@ -215,8 +219,8 @@ static int sync_cleancache(int level)
static const char *const glob_skips[] = {
/* skip signature files - they are removed with their package file */
"*.sig",
- /* skip package database within the cache directory */
- "*.db*",
+ /* skip package databases within the cache directory */
+ "*.db*", "*.files*",
/* skip source packages within the cache directory */
"*.src.tar.*",
/* skip package deltas, we aren't smart enough to clean these yet */