[pacman-dev] CVS update of pacman-lib/lib/libalpm (package.c)
Date: Wednesday, February 14, 2007 @ 11:15:09 Author: aaron Path: /home/cvs-pacman/pacman-lib/lib/libalpm Modified: package.c (1.68 -> 1.69) * Fixed _alpm_pkg_compare_versions so that it does not output warnings if versions match. (reported by Travis Willard) -----------+ package.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) Index: pacman-lib/lib/libalpm/package.c diff -u pacman-lib/lib/libalpm/package.c:1.68 pacman-lib/lib/libalpm/package.c:1.69 --- pacman-lib/lib/libalpm/package.c:1.68 Tue Feb 13 03:15:38 2007 +++ pacman-lib/lib/libalpm/package.c Wed Feb 14 11:15:09 2007 @@ -150,16 +150,19 @@ _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"),
participants (1)
-
Aaron Griffin