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.

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");
 }
 
-- 
1.8.4.1


Reply via email to