diff mbox

[pacman-dev] pacman-conf: fix detection of repo usage

Message ID 20180529224717.19212-1-allan@archlinux.org
State Accepted, archived
Headers show

Commit Message

Allan McRae May 29, 2018, 10:47 p.m. UTC
pacman-conf returned All for any repo Usage query because it was
checking if any repo options were enabled rather than if all options
were enabled.

Signed-off-by: Allan McRae <allan@archlinux.org>
---
 src/pacman/pacman-conf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/src/pacman/pacman-conf.c b/src/pacman/pacman-conf.c
index aa0cdf22..baa72d97 100644
--- a/src/pacman/pacman-conf.c
+++ b/src/pacman/pacman-conf.c
@@ -212,9 +212,9 @@  static void show_siglevel(const char *directive, alpm_siglevel_t level, int pkgo
 	}
 }
 
-static void show_usage(const char *directive, alpm_db_usage_t usage)
+static void show_usage(const char *directive, int usage)
 {
-	if(usage & ALPM_DB_USAGE_ALL) {
+	if(usage == ALPM_DB_USAGE_ALL) {
 		show_str(directive, "All");
 	} else {
 		if(usage & ALPM_DB_USAGE_SYNC) {