summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2007-02-14 16:15:09 +0000
committerAaron Griffin <aaron@archlinux.org>2007-02-14 16:15:09 +0000
commit3a2d87d61df40ddcb716538950d2db7f048483dd (patch)
tree915b3215238761544639b03614a440e48af61292 /lib
parentcd34ced4ada0bac8a370062fbc3cb58e3987cd33 (diff)
downloadpacman-3a2d87d61df40ddcb716538950d2db7f048483dd.tar.xz
* Fixed _alpm_pkg_compare_versions so that it does not output warnings if versions match. (reported by Travis Willard)
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/package.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index fb7e5ee8..85439a6c 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -150,16 +150,19 @@ int alpm_pkg_compare_versions(pmpkg_t *local_pkg, pmpkg_t *pkg)
_alpm_log(PM_LOG_WARNING, _("%s: local (%s) is newer than %s (%s)"),
local_pkg->name, local_pkg->version, db->treename, pkg->version);
cmp = 0;
- } else if(alpm_list_find_str(handle->ignorepkg, pkg->name)) {
- /* package should be ignored (IgnorePkg) */
- _alpm_log(PM_LOG_WARNING, _("%s-%s: ignoring package upgrade (%s)"),
- local_pkg->name, local_pkg->version, pkg->version);
- cmp = 0;
- } else if(_alpm_pkg_istoonew(pkg)) {
- /* package too new (UpgradeDelay) */
- _alpm_log(PM_LOG_DEBUG, _("%s-%s: delaying upgrade of package (%s)"),
- local_pkg->name, local_pkg->version, pkg->version);
- cmp = 0;
+ } else if(cmp < 0) {
+ /* we have an upgrade, make sure we should actually do it */
+ if(alpm_list_find_str(handle->ignorepkg, pkg->name)) {
+ /* package should be ignored (IgnorePkg) */
+ _alpm_log(PM_LOG_WARNING, _("%s-%s: ignoring package upgrade (%s)"),
+ local_pkg->name, local_pkg->version, pkg->version);
+ cmp = 0;
+ } else if(_alpm_pkg_istoonew(pkg)) {
+ /* package too new (UpgradeDelay) */
+ _alpm_log(PM_LOG_WARNING, _("%s-%s: delaying upgrade of package (%s)"),
+ local_pkg->name, local_pkg->version, pkg->version);
+ cmp = 0;
+ }
}
_alpm_log(PM_LOG_DEBUG, _("compare versions for %s: %s vs %s, result=%d"),