aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Harring <ferringb@gentoo.org>2005-07-22 23:27:42 +0000
committerBrian Harring <ferringb@gentoo.org>2005-07-22 23:27:42 +0000
commit9d64e4c8e142b0e66da6fe01959b4f2d36a9a4cb (patch)
tree66f233e833fdf169869695b0f8cf3e905a0b065e /portage
parentbleh (diff)
downloadportage-cvs-9d64e4c8e142b0e66da6fe01959b4f2d36a9a4cb.tar.gz
portage-cvs-9d64e4c8e142b0e66da6fe01959b4f2d36a9a4cb.tar.bz2
portage-cvs-9d64e4c8e142b0e66da6fe01959b4f2d36a9a4cb.zip
cleanup
Diffstat (limited to 'portage')
-rw-r--r--portage/const.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/portage/const.py b/portage/const.py
index a3ee6f6..0ce1c4c 100644
--- a/portage/const.py
+++ b/portage/const.py
@@ -1,8 +1,8 @@
# portage: Constants
# Copyright 1998-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/portage/const.py,v 1.2 2005/07/21 19:50:17 ferringb Exp $
-cvs_id_string="$Id: const.py,v 1.2 2005/07/21 19:50:17 ferringb Exp $"[5:-2]
+# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/portage/const.py,v 1.3 2005/07/22 23:27:42 ferringb Exp $
+cvs_id_string="$Id: const.py,v 1.3 2005/07/22 23:27:42 ferringb Exp $"[5:-2]
# note this is lifted out of portage 2. so... it's held onto for the sake of having stuff we still need,
# but it does need cleanup.
@@ -17,14 +17,13 @@ USER_CONFIG_PATH = "/etc/portage"
#PORTAGE_BASE_PATH = "/usr/lib/portage"
try:
import portage_custom_path
- PORTAGE_BASE_PATH = portage_custom_path.PORTAGE_BASE_PATH
-except ImportError:
+except (ImportError, AttributeError):
portage_custom_path = None
print "warning, can't find portage_custom_path. which means no custom PORTAGE_BASE_PATH"
print "so... that means you're getting /home/bharring/new/ , which quite likely isn't what you want"
- PORTAGE_BASE_PATH = "/home/bharring/new"
+PORTAGE_BASE_PATH = getattr(portage_custom_path, "PORTAGE_BASE_PATH", "/usr/lib/portage/")
PORTAGE_BIN_PATH = getattr(portage_custom_path, "PORTAGE_BIN_PATH", PORTAGE_BASE_PATH+"/bin")
DEFAULT_CONF_FILE = getattr(portage_custom_path, "DEFAULT_CONF_FILE", USER_CONFIG_PATH+"/config")
CONF_DEFAULTS = getattr(portage_custom_path, "CONF_DEFAULTS", PORTAGE_BASE_PATH+"/conf_default_types")