From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-777508-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 47AC7138ADA
	for <garchives@archives.gentoo.org>; Thu, 26 Feb 2015 20:26:15 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 7F9E3E08F3;
	Thu, 26 Feb 2015 20:26:14 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 19AC6E08F3
	for <gentoo-commits@lists.gentoo.org>; Thu, 26 Feb 2015 20:26:14 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 607DA340C2E
	for <gentoo-commits@lists.gentoo.org>; Thu, 26 Feb 2015 20:26:12 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id E2A61129D5
	for <gentoo-commits@lists.gentoo.org>; Thu, 26 Feb 2015 20:12:42 +0000 (UTC)
From: "Brian Dolbec" <dolsen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" <dolsen@gentoo.org>
Message-ID: <1420091886.f186361602b69e1c80bea5b43098d7cde7bddc15.dolsen@gentoo>
Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/, catalyst/base/
X-VCS-Repository: proj/catalyst
X-VCS-Files: catalyst/base/stagebase.py catalyst/defaults.py
X-VCS-Directories: catalyst/ catalyst/base/
X-VCS-Committer: dolsen
X-VCS-Committer-Name: Brian Dolbec
X-VCS-Revision: f186361602b69e1c80bea5b43098d7cde7bddc15
X-VCS-Branch: master
Date: Thu, 26 Feb 2015 20:12:42 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 02b3c9e3-a012-4ce4-b529-f11122b8abd6
X-Archives-Hash: 732c7d7d06bd672e94905cb36dfb8135
Message-ID: <20150226201242.43fjv9uVSRKmFbHbNJtZ5v1JW2piGx8Tp5YrpxWpI6w@z>

commit:     f186361602b69e1c80bea5b43098d7cde7bddc15
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 12 04:13:13 2013 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Jan  1 05:58:06 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=f1863616

Add archdir to settings

---
 catalyst/base/stagebase.py | 8 +++-----
 catalyst/defaults.py       | 2 ++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 96b1c19..daf8e54 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -66,17 +66,15 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		self.archmap = {}
 		self.subarchmap = {}
 		machinemap = {}
-		arch_dir = self.settings["PythonDir"] + "/arch/"
-		for x in [x[:-3] for x in os.listdir(arch_dir) if x.endswith(".py")]:
-			if x == "__init__":
-				continue
+		arch_dir = self.settings["archdir"] + "/"
+		for x in [x[:-3] for x in os.listdir(arch_dir) if x.endswith(".py") and x != "__init__.py"]:
 			try:
 				fh=open(arch_dir + x + ".py")
 				"""
 				This next line loads the plugin as a module and assigns it to
 				archmap[x]
 				"""
-				self.archmap[x]=imp.load_module(x,fh,"../arch/" + x + ".py",
+				self.archmap[x]=imp.load_module(x,fh, arch_dir + x + ".py",
 					(".py", "r", imp.PY_SOURCE))
 				"""
 				This next line registers all the subarches supported in the

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 2839a3d..2f4f429 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -21,6 +21,7 @@ valid_config_file_values.extend([ "distcc", "envscript",
 verbosity = 1
 
 confdefaults={
+	"archdir": "%(PythonDir)s/arch",
 	"distdir": "/usr/portage/distfiles",
 	"hash_function": "crc32",
 	"icecream": "/var/cache/icecream",
@@ -30,6 +31,7 @@ confdefaults={
 	"packagedir": "/usr/portage/packages",
 	"portdir": "/usr/portage",
 	"port_tmpdir": "/var/tmp/portage",
+	"PythonDir": "./catalyst",
 	"repo_name": "portage",
 	"sharedir": "/usr/lib/catalyst",
 	"shdir": "/usr/lib/catalyst/targets/",