FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 11-20-2007, 05:31 PM
Xavier
 
Default [pacman-dev] [PATCH] _alpm_checkconflicts split

On Tue, Nov 20, 2007 at 10:00:55AM +0100, Nagy Gabor wrote:

> diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
> index e6efe2d..8466876 100644
> --- a/lib/libalpm/add.c
> +++ b/lib/libalpm/add.c
> @@ -135,7 +135,7 @@ error:
>
> int _alpm_add_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
> {
> - alpm_list_t *lp = NULL, *i = NULL;
> + alpm_list_t *lp = NULL;
>
> ALPM_LOG_FUNC;
>
> @@ -161,16 +161,19 @@ int _alpm_add_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
>
> /* no unsatisfied deps, so look for conflicts */
> _alpm_log(PM_LOG_DEBUG, "looking for conflicts
");
> - lp = _alpm_checkconflicts(db, trans->packages);
> + alpm_list_t *inner = _alpm_innerconflicts(trans->packages);
> + alpm_list_t *outer = _alpm_outerconflicts(db, trans->packages);
> + lp = alpm_list_join(inner, outer);
> +
> + /* attempt to resolve conflicts */
> + /*
> for(i = lp; i; i = i->next) {
> pmconflict_t *conflict = i->data;
>
> - _alpm_log(PM_LOG_ERROR, _("replacing packages with -A and -U is not supported yet
"));
> - _alpm_log(PM_LOG_ERROR, _("please remove '%s' first, using -Rd
"), conflict->package2);
> + _alpm_log(PM_LOG_ERROR, _("conflict resolving with -A and -U is not supported yet
"));
> + _alpm_log(PM_LOG_ERROR, _("you cannot install '%s' and '%s' at the same time
"), conflict->package1, conflict->package2);
> RET_ERR(PM_ERR_CONFLICTING_DEPS, -1);
>

I'm confused, why did you update the log messages in the part you commented
out?
Also, do we really need all this disabled code? I think a simple TODO would
be enough. Something like :
TODO : factorize the conflict resolving code from sync.c to use it here
(FS#3492)

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 

Thread Tools




All times are GMT. The time now is 11:35 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org