aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2012-11-12 07:52:36 -0800
committerBrian Dolbec <dolsen@gentoo.org>2012-11-12 07:52:36 -0800
commit834e89227be486c6458aeb8c28423bbbb6fa3bd5 (patch)
tree985698d550642ae4e4930c5715f9b585300f8618 /mirrorselect
parentadd myself to Copywrite (diff)
downloadmirrorselect-834e89227be486c6458aeb8c28423bbbb6fa3bd5.tar.gz
mirrorselect-834e89227be486c6458aeb8c28423bbbb6fa3bd5.tar.bz2
mirrorselect-834e89227be486c6458aeb8c28423bbbb6fa3bd5.zip
initial EPREFIX enabling. not fully tested.
Diffstat (limited to 'mirrorselect')
-rwxr-xr-xmirrorselect/main.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/mirrorselect/main.py b/mirrorselect/main.py
index 13c0a9f..528f383 100755
--- a/mirrorselect/main.py
+++ b/mirrorselect/main.py
@@ -47,6 +47,15 @@ from mirrorselect.selectors import Deep, Shallow, Extractor, Interactive
from mirrorselect.version import version
+# establish the eprefix, initially set so eprefixify can
+# set it on install
+EPREFIX = "@GENTOO_PORTAGE_EPREFIX@"
+
+# check and set it if it wasn't
+if "GENTOO_PORTAGE_EPREFIX" in EPREFIX:
+ EPREFIX = ''
+
+
class MirrorSelect(object):
'''Main operational class'''
@@ -352,11 +361,11 @@ class MirrorSelect(object):
@rtype: string
'''
# start with the new location
- config_path = '/etc/portage/make.conf'
+ config_path = EPREFIX + '/etc/portage/make.conf'
if not os.access(config_path, os.F_OK):
# check if the old location is what is used
- if os.access('/etc/make.conf', os.F_OK):
- config_path = '/etc/make.conf'
+ if os.access(EPREFIX + '/etc/make.conf', os.F_OK):
+ config_path = EPREFIX + '/etc/make.conf'
return config_path