On 21/10/13 17:11, Chirantan Ekbote wrote:
> We should print an error if both --native and --foreign are passed as
> options to -Q.  Instead we are currently printing an error even if only
> one of them is passed to -Q.

I'm going with the patch I submitted earlier [1] because I find it much
easier to see what is being tested.

[1] https://patchwork.archlinux.org/patch/1639/

Allan


> Signed-off-by: Chirantan Ekbote <[email protected]>
> ---
>  src/pacman/pacman.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
> index f485692..5349517 100644
> --- a/src/pacman/pacman.c
> +++ b/src/pacman/pacman.c
> @@ -600,7 +600,7 @@ static void checkargs_query(void)
>       }
>  
>       invalid_opt(config->op_q_deps && config->op_q_explicit, "--deps", 
> "--explicit");
> -     invalid_opt(config->op_q_locality & (PKG_LOCALITY_NATIVE | 
> PKG_LOCALITY_FOREIGN),
> +     invalid_opt(!(config->op_q_locality ^ (PKG_LOCALITY_NATIVE | 
> PKG_LOCALITY_FOREIGN)),
>                       "--native", "--foreign");
>  }
>  
> 


Reply via email to