summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-12-21 18:04:49 +0000
committerAaron Griffin <aaron@archlinux.org>2006-12-21 18:04:49 +0000
commit77b4d0d013fe4aabb7d44e4a1f23af56b8cccfba (patch)
tree555046025eaa59f5117aa2f9ee8e576d10373caf
parent2689fba656d6fc59a1349c959a3369ec0aa7cb49 (diff)
downloadpacman-77b4d0d013fe4aabb7d44e4a1f23af56b8cccfba.tar.xz
*untested* potential fix for the NoUpgrade issues.
-rw-r--r--lib/libalpm/add.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 92aceff6..394fdd30 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -513,6 +513,7 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
/* file already exists */
if(_alpm_list_is_strin(pathname, handle->noupgrade)) {
notouch = 1;
+ nb = 1;
} else {
if(!pmo_upgrade || oldpkg == NULL) {
nb = _alpm_list_is_strin(pathname, info->backup);
@@ -706,9 +707,8 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
if(!file) continue;
if(!strcmp(file, pathname)) {
_alpm_log(PM_LOG_DEBUG, _("appending backup entry"));
- snprintf(path, PATH_MAX, "%s%s", handle->root, file);
if (info->sha1sum != NULL && info->sha1sum != '\0') {
- md5 = _alpm_MDFile(path);
+ md5 = _alpm_MDFile(expath);
/* 32 for the hash, 1 for the terminating NULL, and 1 for the tab delimiter */
if((fn = (char *)malloc(strlen(file)+34)) == NULL) {
RET_ERR(PM_ERR_MEMORY, -1);
@@ -717,7 +717,7 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
FREE(md5);
} else {
/* 41 for the hash, 1 for the terminating NULL, and 1 for the tab delimiter */
- sha1 = _alpm_SHAFile(path);
+ sha1 = _alpm_SHAFile(expath);
if((fn = (char *)malloc(strlen(file)+43)) == NULL) {
RET_ERR(PM_ERR_MEMORY, -1);
}