[pacman-dev] [PATCH 2/2] Don't print an error for valid native/foreign options
Allan McRae
allan at archlinux.org
Thu Oct 24 00:37:57 EDT 2013
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 <chirantan.ekbote at gmail.com>
> ---
> 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");
> }
>
>
More information about the pacman-dev
mailing list