diff options
author | Aaron Griffin <aaron@archlinux.org> | 2007-02-23 02:10:56 +0000 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2007-02-23 02:10:56 +0000 |
commit | d584d8c06842cec99bff1e07b565ee0511cfade8 (patch) | |
tree | b1563526d705c6d52a061de93fe4c738effcceb2 /lib/libalpm/package.c | |
parent | c799433e423d5bdd6737b81483de82b9e98aed46 (diff) | |
download | pacman-d584d8c06842cec99bff1e07b565ee0511cfade8.tar.xz |
* Modified the handling and output w.r.t. IgnorePkg entries. -Sy always ignores
these packages, but -S explicitly asks for confirmation.
Diffstat (limited to 'lib/libalpm/package.c')
-rw-r--r-- | lib/libalpm/package.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index 09161dba..bf086aba 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -141,27 +141,29 @@ int alpm_pkg_compare_versions(pmpkg_t *local_pkg, pmpkg_t *pkg) } /* compare versions and see if we need to upgrade */ - cmp = _alpm_versioncmp(local_pkg->version, pkg->version); + cmp = _alpm_versioncmp(pkg->version, local_pkg->version); if(cmp != 0 && pkg->force) { cmp = 1; _alpm_log(PM_LOG_WARNING, _("%s: forcing upgrade to version %s"), local_pkg->name, pkg->version); - } else if(cmp > 0) { + } else if(cmp < 0) { /* local version is newer */ pmdb_t *db = pkg->data; _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(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; } } |