Allow overlays and the user profile to extend arch.list.
authorJason Stubbs <jstubbs@gentoo.org>
Sun, 25 Dec 2005 10:37:56 +0000 (10:37 -0000)
committerJason Stubbs <jstubbs@gentoo.org>
Sun, 25 Dec 2005 10:37:56 +0000 (10:37 -0000)
svn path=/main/trunk/; revision=2468

pym/portage.py

index 57e266f2982c3785f55dce1674cff48df7041d04..24d1ded55463949f65c8eaa65abd336fd46f9d21 100644 (file)
@@ -1101,9 +1101,6 @@ class config:
                        self.lookuplist=self.configlist[:]
                        self.lookuplist.reverse()
 
-                       archlist = grabfile(self["PORTDIR"]+"/profiles/arch.list")
-                       self.configdict["conf"]["PORTAGE_ARCHLIST"] = string.join(archlist)
-
                        if os.environ.get("PORTAGE_CALLER","") == "repoman":
                                # repoman shouldn't use local settings.
                                locations = [self["PORTDIR"] + "/profiles"]
@@ -1160,6 +1157,10 @@ class config:
                        self.categories = stack_lists(categories, incremental=1)
                        del categories
 
+                       archlist = grab_multiple("arch.list", locations, grabfile)
+                       archlist = stack_lists(archlist, incremental=1)
+                       self.configdict["conf"]["PORTAGE_ARCHLIST"] = " ".join(archlist)
+
                        # get virtuals -- needs categories
                        self.loadVirtuals('/')
 
@@ -6903,10 +6904,9 @@ if not os.path.isdir(settings["PORTAGE_TMPDIR"]):
 # COMPATABILITY -- This shouldn't be used.
 pkglines = settings.packages
 
-groups=settings["ACCEPT_KEYWORDS"].split()
-archlist=[]
-for myarch in grabfile(settings["PORTDIR"]+"/profiles/arch.list"):
-       archlist += [myarch,"~"+myarch]
+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")