diff options
author | Dan McGee <dan@archlinux.org> | 2012-03-16 12:08:10 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-03-16 12:08:10 -0500 |
commit | e6f72c61a098b52ea29e54b8eb4739a2ff81e6b0 (patch) | |
tree | f04692879dc63fe9f958500ebd646eb169d32fe4 | |
parent | 573bd80f147ce90f21ef51fb8ca6f71e89cc3a74 (diff) | |
parent | f988aa6b32503f5d4003b1402089df74adf8b485 (diff) |
Merge branch 'maint'
Conflicts:
lib/libalpm/sync.c
-rw-r--r-- | doc/index.txt | 17 | ||||
-rw-r--r-- | lib/libalpm/dload.c | 5 | ||||
-rw-r--r-- | lib/libalpm/sync.c | 8 | ||||
-rw-r--r-- | scripts/makepkg.sh.in | 2 | ||||
-rw-r--r-- | src/pacman/sync.c | 17 |
5 files changed, 41 insertions, 8 deletions
diff --git a/doc/index.txt b/doc/index.txt index b221d237..9e94dbb7 100644 --- a/doc/index.txt +++ b/doc/index.txt @@ -96,12 +96,19 @@ Releases !3.1.3 !2008-03-06 !3.1.2 !2008-02-20 !3.1.1 !2008-01-20 -!3.1.0 !2008-01-09 !====== | [frame="topbot",grid="none",options="header,autowidth"] !====== !Version !Date +!3.1.0 !2008-01-09 +!3.0.6 !2007-09-16 +!3.0.5 !2007-06-17 +!3.0.4 !2007-05-08 +!3.0.3 !2007-04-28 +!3.0.2 !2007-04-23 +!3.0.1 !2007-04-04 +!3.0.0 !2007-03-25 !2.9.8 !2006-02-02 !2.9.7 !2005-09-16 !2.9.7-TEST3 !2005-09-11 @@ -122,15 +129,15 @@ Releases !2.7.9 !2004-04-30 !2.7.8 !2004-04-29 !2.7.7 !2004-04-15 -!2.7.6 !2004-04-04 -!2.7.5 !2004-03-02 -!2.7.4 !2004-02-18 -!2.7.3 !2004-02-07 !====== | [frame="topbot",grid="none",options="header,autowidth"] !====== !Version !Date +!2.7.6 !2004-04-04 +!2.7.5 !2004-03-02 +!2.7.4 !2004-02-18 +!2.7.3 !2004-02-07 !2.7.2 !2004-01-04 !2.7.1 !2003-12-21 !2.7 !2003-11-25 diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index 05988065..b3ac024c 100644 --- a/lib/libalpm/dload.c +++ b/lib/libalpm/dload.c @@ -390,6 +390,11 @@ static int curl_download_internal(struct dload_payload *payload, CURL *curl = get_libcurl_handle(handle); handle->pm_errno = 0; + /* make sure these are NULL */ + FREE(payload->tempfile_name); + FREE(payload->destfile_name); + FREE(payload->content_disp_name); + payload->tempfile_openmode = "wb"; if(!payload->remote_name) { STRDUP(payload->remote_name, get_filename(payload->fileurl), diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index e84679a0..ab7fe319 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -864,6 +864,9 @@ static int download_single_file(alpm_handle_t *handle, struct dload_payload *pay { const alpm_list_t *server; + payload->handle = handle; + payload->allow_resume = 1; + for(server = payload->servers; server; server = server->next) { const char *server_url = server->data; size_t len; @@ -872,12 +875,13 @@ static int download_single_file(alpm_handle_t *handle, struct dload_payload *pay len = strlen(server_url) + strlen(payload->remote_name) + 2; MALLOC(payload->fileurl, len, RET_ERR(handle, ALPM_ERR_MEMORY, -1)); snprintf(payload->fileurl, len, "%s/%s", server_url, payload->remote_name); - payload->handle = handle; - payload->allow_resume = 1; if(_alpm_download(payload, cachedir, NULL) != -1) { return 0; } + + free(payload->fileurl); + payload->unlink_on_fail = 0; } return -1; diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 0ec5ae1f..eb1329c7 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -170,7 +170,7 @@ clean_up() { for pkg in ${pkgname[@]}; do for file in ${pkg}-*-*-${CARCH}{${PKGEXT},${SRCEXT}}; do if [[ -h $file && ! -e $file ]]; then - rm -f $file + rm -f "$file" fi done done 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); |