summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2007-04-23 03:46:54 +0000
committerAaron Griffin <aaron@archlinux.org>2007-04-23 03:46:54 +0000
commit38e3b7c4fabe4f44533308a6e4ca01c3b13b74e1 (patch)
treeabf5cc6519a0d57981d46166d7b799ddec820f9c
parent8af5c8d421c6c833a467fb16400aa4c22d2e7ab8 (diff)
* Chantry Xavier <xav@chantry.homelinux.org>
Let IgnorePkg take precedence over the FORCE package flag
-rw-r--r--lib/libalpm/package.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index d1bbcda3..74adf5cd 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -142,6 +142,14 @@ int alpm_pkg_compare_versions(pmpkg_t *local_pkg, pmpkg_t *pkg)
_alpm_db_read(pkg->data, pkg, INFRQ_DESC);
}
+ 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));
+ 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));
@@ -158,13 +166,7 @@ int alpm_pkg_compare_versions(pmpkg_t *local_pkg, pmpkg_t *pkg)
cmp = 0;
} else if(cmp > 0) {
/* we have an upgrade, make sure we should actually do it */
- 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));
- cmp = 0;
- } else if(_alpm_pkg_istoonew(pkg)) {
+ if(_alpm_pkg_istoonew(pkg)) {
/* package too new (UpgradeDelay) */
_alpm_log(PM_LOG_WARNING, _("%s-%s: delaying upgrade of package (%s)"),
alpm_pkg_get_name(local_pkg), alpm_pkg_get_version(local_pkg),