Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-03-16 12:08:10 -0500
committerDan McGee <dan@archlinux.org>2012-03-16 12:08:10 -0500
commite6f72c61a098b52ea29e54b8eb4739a2ff81e6b0 (patch)
treef04692879dc63fe9f958500ebd646eb169d32fe4 /src
parent573bd80f147ce90f21ef51fb8ca6f71e89cc3a74 (diff)
parentf988aa6b32503f5d4003b1402089df74adf8b485 (diff)
Merge branch 'maint'
Conflicts: lib/libalpm/sync.c
Diffstat (limited to 'src')
-rw-r--r--src/pacman/sync.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index e69ca587..d782a94d 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -26,6 +26,7 @@
#include <errno.h>
#include <dirent.h>
#include <sys/stat.h>
+#include <fnmatch.h>
#include <alpm.h>
#include <alpm_list.h>
@@ -222,6 +223,22 @@ static int sync_cleancache(int level)
if(strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0) {
continue;
}
+
+ /* skip signature files - they are removed with their package file */
+ if(fnmatch("*.sig", ent->d_name, 0) == 0) {
+ continue;
+ }
+
+ /* skip package database within the cache directory */
+ if(fnmatch("*.db*", ent->d_name, 0) == 0) {
+ continue;
+ }
+
+ /* skip source packages within the cache directory */
+ if(fnmatch("*.src.tar*", ent->d_name, 0) == 0) {
+ continue;
+ }
+
/* build the full filepath */
snprintf(path, PATH_MAX, "%s%s", cachedir, ent->d_name);