From d060e31be3586ce27382f80eaed7a9edf2c86aeb Mon Sep 17 00:00:00 2001 From: Nagy Gabor Date: Mon, 10 Mar 2008 15:38:08 +0100 Subject: Remove trans->targets Its implementation was quite broken: * add_loadtarget() might have silently filtered out some targets when replacing an older version. * This was used in sync.c to determine whether a target is implicit or not, which is incorrect behavior. Before this patch we silently removed user confirmed replacements; now we always warn on a replacement. * remove001.py behavior was quite odd in adding same target 5 times to the target list, we can change this behavior to be a failure. Signed-off-by: Nagy Gabor [Xav: changed remove001 pactest accordingly] Signed-off-by: Chantry Xavier [Dan: rewrote commit message] Signed-off-by: Dan McGee --- lib/libalpm/sync.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'lib/libalpm/sync.c') diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 2bd9c529..26d1d3ca 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -509,13 +509,10 @@ int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync goto cleanup; } - _alpm_log(PM_LOG_DEBUG, "removing '%s' from target list\n", rsync->pkg->name); - /* Only prints a warning if rsync is an explicit target. */ - if(alpm_list_find_str(trans->targets, rsync->pkg->name)) { - _alpm_log(PM_LOG_WARNING, - _("removing '%s' from target list because it conflicts with '%s'\n"), - rsync->pkg->name, sync->pkg->name); - } + /* Prints warning */ + _alpm_log(PM_LOG_WARNING, + _("removing '%s' from target list because it conflicts with '%s'\n"), + rsync->pkg->name, sync->pkg->name); void *vpkg; trans->packages = alpm_list_remove(trans->packages, rsync, syncpkg_cmp, &vpkg); -- cgit v1.2.3-54-g00ecf