diff options
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 | |
parent | 1ef27e97a1a880288ba85cf45119e0074ff372eb (diff) | |
download | pacman-1381b58ceb36dbb10cee10584a12ef341018c0fa.tar.xz |
Fix extraneous "ignoring upgrade" output on Ignore'd packages
Reorder package version checking so there is no output when a
package is listed in IgnorePkg.
Closes FS#7111
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'lib/libalpm')
-rw-r--r-- | lib/libalpm/package.c | 14 |
1 files changed, 8 insertions, 6 deletions
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"), |