Skip to content

Commit

Permalink
catalyst/defaults.py: use EPREFIX where apropriate
Browse files Browse the repository at this point in the history
Signed-off-by: Marty E. Plummer <[email protected]>
  • Loading branch information
hanetzer committed Apr 27, 2018
1 parent be84b39 commit bc378a3
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions catalyst/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
else:
TAR = 'bsd'

# 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 = ''

# these should never be touched
required_build_targets = ["targetbase", "generic_stage_target"]
Expand All @@ -33,7 +39,7 @@

# set our base defaults here to keep
# them in one location.
BASE_GENTOO_DIR = "/var/gentoo"
BASE_GENTOO_DIR = os.path.join(os.sep, EPREFIX.lstrip(os.sep), "var/gentoo")
REPODIR = BASE_GENTOO_DIR + "/repos"
DISTDIR = BASE_GENTOO_DIR + "/distfiles"
PKGDIR = BASE_GENTOO_DIR + "/packages"
Expand All @@ -50,30 +56,30 @@
"decompressor_search_order": DECOMPRESSOR_SEARCH_ORDER,
"distdir": DISTDIR[:],
"hash_function": "crc32",
"icecream": "/var/cache/icecream",
"icecream": os.path.join(os.sep, EPREFIX.lstrip(os.sep), "var/cache/icecream"),
'list_xattrs_opt': LIST_XATTRS_OPTIONS[TAR],
"local_overlay": REPODIR[:] + "/local",
"port_conf": "/etc/portage",
"port_conf": os.path.join(os.sep, EPREFIX.lstrip(os.sep), "etc/portage"),
"make_conf": "%(port_conf)s/make.conf",
"options": set(),
"packagedir": PKGDIR[:],
"portdir": PORTDIR[:],
"port_tmpdir": "/var/tmp/portage",
"port_tmpdir": os.path.join(os.sep, EPREFIX.lstrip(os.sep), "var/tmp/portage"),
"PythonDir": "./catalyst",
"repo_basedir": REPODIR[:],
"repo_name": MAINREPO[:],
"sed": "sed",
"sharedir": "/usr/share/catalyst",
"shdir": "/usr/share/catalyst/targets/",
"snapshot_cache": "/var/tmp/catalyst/snapshot_cache",
"sharedir": os.path.join(os.sep, EPREFIX.lstrip(os.sep), "usr/share/catalyst"),
"shdir": os.path.join(os.sep, EPREFIX.lstrip(os.sep), "usr/share/catalyst/targets/"),
"snapshot_cache": os.path.join(os.sep, EPREFIX.lstrip(os.sep), "var/tmp/catalyst/snapshot_cache"),
"snapshot_name": "%(repo_name)s-",
"source_matching": "strict",
"storedir": "/var/tmp/catalyst",
"storedir": os.path.join(os.sep, EPREFIX.lstrip(os.sep), "var/tmp/catalyst"),
"target_distdir": DISTDIR[:],
"target_pkgdir": PKGDIR[:],
}

DEFAULT_CONFIG_FILE = '/etc/catalyst/catalyst.conf'
DEFAULT_CONFIG_FILE = os.path.join(os.sep, EPREFIX.lstrip(os.sep), 'etc/catalyst/catalyst.conf')

PORT_LOGDIR_CLEAN = \
'find "${PORT_LOGDIR}" -type f ! -name "summary.log*" -mtime +30 -delete'
Expand Down

0 comments on commit bc378a3

Please sign in to comment.