1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-05 17:15:02 -05:00

* Chantry Xavier <xav@chantry.homelinux.org>

Let IgnorePkg take precedence over the FORCE package flag
This commit is contained in:
Aaron Griffin 2007-04-23 03:46:54 +00:00
parent 8af5c8d421
commit 38e3b7c4fa

View File

@ -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),