diff options
-rw-r--r-- | pym/portage.py | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/pym/portage.py b/pym/portage.py index 7dd659bfe..1dc1a999c 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -1263,6 +1263,15 @@ class config: self["CBUILD"] = self["CHOST"] self.backup_changes("CBUILD") + groups = self["ACCEPT_KEYWORDS"].split() + archlist = self.archlist() + if not archlist: + writemsg("--- 'profiles/arch.list' is empty or not available. Empty portage tree?\n") + else: + for group in groups: + if group not in archlist and group[0] != '-': + writemsg("!!! INVALID ACCEPT_KEYWORDS: %s\n" % str(group)) + if mycpv: self.setcpv(mycpv) @@ -1651,6 +1660,10 @@ class config: thirdparty_lists = [grabdict(os.path.join(x, "thirdpartymirrors")) for x in profileroots] return stack_dictlist(thirdparty_lists, incremental=True) + def archlist(self): + return flatten([[myarch, "~" + myarch] \ + for myarch in self["PORTAGE_ARCHLIST"].split()]) + # XXX This would be to replace getstatusoutput completely. # XXX Issue: cannot block execution. Deadlock condition. def spawn(mystring,mysettings,debug=0,free=0,droppriv=0,sesandbox=0,fd_pipes=None,**keywords): @@ -6850,14 +6863,7 @@ if not os.path.isdir(settings["PORTAGE_TMPDIR"]): pkglines = settings.packages groups = settings["ACCEPT_KEYWORDS"].split() -archlist = flatten([[myarch, "~"+myarch] for myarch in settings["PORTAGE_ARCHLIST"].split()]) - -for group in groups: - if not archlist: - writemsg("--- 'profiles/arch.list' is empty or not available. Empty portage tree?\n") - break - elif (group not in archlist) and group[0]!='-': - writemsg("\n"+red("!!! INVALID ACCEPT_KEYWORDS: ")+str(group)+"\n") +archlist = settings.archlist() # Clear the cache dircache={} |