index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Aaron Griffin <aaron@archlinux.org> | 2006-12-22 06:07:33 +0000 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2006-12-22 06:07:33 +0000 |
commit | 796490546e2d3868a387ff18b05f2fa382a9aa7e (patch) | |
tree | 9a71b2f847d6f98a012ab5b2fdebfa8e2cf3b4a6 /lib/libalpm | |
parent | 2a8980866709c0e85f23e5eeab6188c9376fe451 (diff) |
-rw-r--r-- | lib/libalpm/add.c | 25 |
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; |