summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/package.c14
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"),