[pacman-dev] [arch-general] Package group xorg-video-drivers: intel conflict

Xavier shiningxc at gmail.com
Sat Dec 15 11:27:55 EST 2007


On Sat, Dec 15, 2007 at 11:01:52AM -0500, Nathan Jones wrote:
> 
> How about this patch? Xavier, this is different from what you removed in
> 8f824e70b because it is now sees if 'spkg' is ignored, not 'local'. Some
> examples:
> 
> 
> From: Nathan Jones <nathanj at insightbb.com>
> Date: Sat, 15 Dec 2007 10:48:00 -0500
> Subject: [PATCH] Check ignored packages in _alpm_sync_addtarget().
> 
> This will allow someone to install a group but ignore individual
> packages inside the group.
> 
> Signed-off-by: Nathan Jones <nathanj at insightbb.com>
> ---
>  lib/libalpm/sync.c |    8 ++++++++
>  src/pacman/sync.c  |    2 +-
>  2 files changed, 9 insertions(+), 1 deletions(-)
> 
> diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
> index 065340c..7128fea 100644
> --- a/lib/libalpm/sync.c
> +++ b/lib/libalpm/sync.c
> @@ -346,6 +346,14 @@ int _alpm_sync_addtarget(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sy
>  		RET_ERR(PM_ERR_PKG_NOT_FOUND, -1);
>  	}
>  
> +	if(_alpm_pkg_should_ignore(spkg)) {
> +		int resp;
> +		QUESTION(trans, PM_TRANS_CONV_INSTALL_IGNOREPKG, spkg, NULL, NULL, &resp);
> +		if (!resp) {
> +			return(0);
> +		}
> +	}
> +
>  	local = _alpm_db_get_pkgfromcache(db_local, alpm_pkg_get_name(spkg));
>  	if(local) {
>  		if(alpm_pkg_compare_versions(local, spkg) == 0) {


Thanks, it's perfect, that's kinda what I had in mind as a quick fix before
the 3.1 release (but I'm a little busy these days :p).

> diff --git a/src/pacman/sync.c b/src/pacman/sync.c
> index df102af..f6f82be 100644
> --- a/src/pacman/sync.c
> +++ b/src/pacman/sync.c
> @@ -584,7 +584,7 @@ static int sync_trans(alpm_list_t *targets, int sync_only)
>  						alpm_list_t *k;
>  
>  						found++;
> -						printf(_(":: group %s:\n"), targ);
> +						printf(_(":: group %s (including ignored packages):\n"), targ);
>  						/* remove dupe entries in case a package exists in multiple repos */
>  						const alpm_list_t *grppkgs = alpm_grp_get_pkgs(grp);
>  						alpm_list_t *pkgs = alpm_list_remove_dupes(grppkgs);
> -- 
> 1.5.3.7
> 

Well, not sure this is necessary, because the packages aren't automatically
ignored, a question is asked and the user can choose.
But why not, it makes it clearer than the group handling happens first, in
the frontend, and the ignore handling happens only later, in the backend.




More information about the pacman-dev mailing list