Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-12-22 06:07:33 +0000
committerAaron Griffin <aaron@archlinux.org>2006-12-22 06:07:33 +0000
commit796490546e2d3868a387ff18b05f2fa382a9aa7e (patch)
tree9a71b2f847d6f98a012ab5b2fdebfa8e2cf3b4a6 /lib/libalpm
parent2a8980866709c0e85f23e5eeab6188c9376fe451 (diff)
* Properly fix the NoUpgrade issues.
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/add.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 5fda291c..84bf4c3a 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -511,21 +511,20 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
if(!stat(expath, &buf) && !S_ISDIR(buf.st_mode)) {
/* file already exists */
- if(_alpm_list_is_strin(pathname, handle->noupgrade)) {
- notouch = 1;
- nb = 1;
+ if(!pmo_upgrade || oldpkg == NULL) {
+ nb = _alpm_list_is_strin(pathname, info->backup);
} else {
- if(!pmo_upgrade || oldpkg == NULL) {
- nb = _alpm_list_is_strin(pathname, info->backup);
- } else {
- /* op == PM_TRANS_TYPE_UPGRADE */
- md5_orig = _alpm_needbackup(pathname, oldpkg->backup);
- sha1_orig = _alpm_needbackup(pathname, oldpkg->backup);
- if(md5_orig || sha1_orig) {
- nb = 1;
- }
+ /* op == PM_TRANS_TYPE_UPGRADE */
+ md5_orig = _alpm_needbackup(pathname, oldpkg->backup);
+ sha1_orig = _alpm_needbackup(pathname, oldpkg->backup);
+ if(md5_orig || sha1_orig) {
+ nb = 1;
}
}
+ if(_alpm_list_is_strin(pathname, handle->noupgrade)) {
+ notouch = 1;
+ nb = 0;
+ }
}
if(nb) {
@@ -623,7 +622,7 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
alpm_logaction(_("warning: %s saved as %s"), expath, newpath);
}
}
- } else if(md5_pkg || sha1_pkg) {
+ } else if(md5_orig || sha1_pkg) {
/* PM_UPGRADE */
int installnew = 0;