Fix IgnorePkg handling with replacement packages

Allow IgnorePkg (or --ignore) to work for _either_ side of a
replacement.  For example, if 'foo' is set to replace 'bar',
ignoring either package will skip this replacement.

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
This commit is contained in:
Aaron Griffin 2007-05-09 23:11:39 -05:00
parent 34ee32d373
commit 1213212c31

View file

@ -123,7 +123,9 @@ static int find_replacements(pmtrans_t *trans, pmdb_t *db_local,
}
_alpm_log(PM_LOG_DEBUG, _("checking replacement '%s' for package '%s'"), replacement, spkg->name);
if(alpm_list_find_str(handle->ignorepkg, lpkg->name)) {
/* ignore if EITHER the local or replacement package are to be ignored */
if(alpm_list_find_str(handle->ignorepkg, spkg->name)
|| alpm_list_find_str(handle->ignorepkg, lpkg->name)) {
_alpm_log(PM_LOG_WARNING, _("%s-%s: ignoring package upgrade (to be replaced by %s-%s)"),
alpm_pkg_get_name(lpkg), alpm_pkg_get_version(lpkg),
alpm_pkg_get_name(spkg), alpm_pkg_get_version(spkg));