From 1213212c3116051b398905ca1014e6dca5c45481 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Wed, 9 May 2007 23:11:39 -0500 Subject: 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 --- lib/libalpm/sync.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 7823a67b..ef8af5c6 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -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)); -- cgit v1.2.3-70-g09d2