index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Chantry Xavier <xav@chantry.homelinux.org> | 2007-05-18 01:22:18 -0500 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2007-05-18 01:22:18 -0500 |
commit | 1381b58ceb36dbb10cee10584a12ef341018c0fa (patch) | |
tree | b07e51bcc838b088abab655063d675745268bf53 /lib/libalpm/package.c | |
parent | 1ef27e97a1a880288ba85cf45119e0074ff372eb (diff) |
-rw-r--r-- | lib/libalpm/package.c | 14 |
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index 17851535..d3547dfb 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -139,17 +139,19 @@ int alpm_pkg_compare_versions(pmpkg_t *local_pkg, pmpkg_t *pkg) _alpm_db_read(pkg->data, pkg, INFRQ_DESC); } + /* compare versions and see if we need to upgrade */ + cmp = _alpm_versioncmp(alpm_pkg_get_version(pkg), alpm_pkg_get_version(local_pkg)); + if(alpm_list_find_str(handle->ignorepkg, alpm_pkg_get_name(pkg))) { /* package should be ignored (IgnorePkg) */ - _alpm_log(PM_LOG_WARNING, _("%s-%s: ignoring package upgrade (%s)"), - alpm_pkg_get_name(local_pkg), alpm_pkg_get_version(local_pkg), - alpm_pkg_get_version(pkg)); + if(cmp > 0) { + _alpm_log(PM_LOG_WARNING, _("%s-%s: ignoring package upgrade (%s)"), + alpm_pkg_get_name(local_pkg), alpm_pkg_get_version(local_pkg), + alpm_pkg_get_version(pkg)); + } return(0); } - /* compare versions and see if we need to upgrade */ - cmp = _alpm_versioncmp(alpm_pkg_get_version(pkg), alpm_pkg_get_version(local_pkg)); - if(cmp != 0 && pkg->force) { cmp = 1; _alpm_log(PM_LOG_WARNING, _("%s: forcing upgrade to version %s"), |