aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qkeyword.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/qkeyword.c b/qkeyword.c
index f6cdbc2..0989e20 100644
--- a/qkeyword.c
+++ b/qkeyword.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2020 Gentoo Foundation
+ * Copyright 2005-2022 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
*
* Copyright 2006 Thomas A. Cort - <tcort@gentoo.org>
@@ -785,6 +785,12 @@ qkeyword_traverse(tree_pkg_cb func, void *priv)
array_for_each(overlays, n, overlay)
qkeyword_load_arches(overlay);
+ if (archlist_count == 0 || archlist == NULL) {
+ warnf("no arches could be found in your active overlays (see q -o), "
+ "do you have profiles/arch.list files present?\n");
+ return EXIT_FAILURE;
+ }
+
/* allocate memory (once) for the list used by various funcs */
if (archlist_count > data->keywordsbuflen) {
data->keywordsbuf = xrealloc(data->keywordsbuf,