|
11 | 11 | else: |
12 | 12 | TAR = 'bsd' |
13 | 13 |
|
| 14 | +# establish the eprefix, initially set so eprefixify can |
| 15 | +# set it on install |
| 16 | +EPREFIX = "@GENTOO_PORTAGE_EPREFIX@" |
| 17 | +# check and set it if it wasn't |
| 18 | +if "GENTOO_PORTAGE_EPREFIX" in EPREFIX: |
| 19 | + EPREFIX = '' |
14 | 20 |
|
15 | 21 | # these should never be touched |
16 | 22 | required_build_targets = ["targetbase", "generic_stage_target"] |
|
33 | 39 |
|
34 | 40 | # set our base defaults here to keep |
35 | 41 | # them in one location. |
36 | | -BASE_GENTOO_DIR = "/var/gentoo" |
| 42 | +BASE_GENTOO_DIR = os.path.join(os.sep, EPREFIX.lstrip(os.sep), "var/gentoo") |
37 | 43 | REPODIR = BASE_GENTOO_DIR + "/repos" |
38 | 44 | DISTDIR = BASE_GENTOO_DIR + "/distfiles" |
39 | 45 | PKGDIR = BASE_GENTOO_DIR + "/packages" |
|
50 | 56 | "decompressor_search_order": DECOMPRESSOR_SEARCH_ORDER, |
51 | 57 | "distdir": DISTDIR[:], |
52 | 58 | "hash_function": "crc32", |
53 | | - "icecream": "/var/cache/icecream", |
| 59 | + "icecream": os.path.join(os.sep, EPREFIX.lstrip(os.sep), "var/cache/icecream"), |
54 | 60 | 'list_xattrs_opt': LIST_XATTRS_OPTIONS[TAR], |
55 | 61 | "local_overlay": REPODIR[:] + "/local", |
56 | | - "port_conf": "/etc/portage", |
| 62 | + "port_conf": os.path.join(os.sep, EPREFIX.lstrip(os.sep), "etc/portage"), |
57 | 63 | "make_conf": "%(port_conf)s/make.conf", |
58 | 64 | "options": set(), |
59 | 65 | "packagedir": PKGDIR[:], |
60 | 66 | "portdir": PORTDIR[:], |
61 | | - "port_tmpdir": "/var/tmp/portage", |
| 67 | + "port_tmpdir": os.path.join(os.sep, EPREFIX.lstrip(os.sep), "var/tmp/portage"), |
62 | 68 | "PythonDir": "./catalyst", |
63 | 69 | "repo_basedir": REPODIR[:], |
64 | 70 | "repo_name": MAINREPO[:], |
65 | 71 | "sed": "sed", |
66 | | - "sharedir": "/usr/share/catalyst", |
67 | | - "shdir": "/usr/share/catalyst/targets/", |
68 | | - "snapshot_cache": "/var/tmp/catalyst/snapshot_cache", |
| 72 | + "sharedir": os.path.join(os.sep, EPREFIX.lstrip(os.sep), "usr/share/catalyst"), |
| 73 | + "shdir": os.path.join(os.sep, EPREFIX.lstrip(os.sep), "usr/share/catalyst/targets/"), |
| 74 | + "snapshot_cache": os.path.join(os.sep, EPREFIX.lstrip(os.sep), "var/tmp/catalyst/snapshot_cache"), |
69 | 75 | "snapshot_name": "%(repo_name)s-", |
70 | 76 | "source_matching": "strict", |
71 | | - "storedir": "/var/tmp/catalyst", |
| 77 | + "storedir": os.path.join(os.sep, EPREFIX.lstrip(os.sep), "var/tmp/catalyst"), |
72 | 78 | "target_distdir": DISTDIR[:], |
73 | 79 | "target_pkgdir": PKGDIR[:], |
74 | 80 | } |
75 | 81 |
|
76 | | -DEFAULT_CONFIG_FILE = '/etc/catalyst/catalyst.conf' |
| 82 | +DEFAULT_CONFIG_FILE = os.path.join(os.sep, EPREFIX.lstrip(os.sep), 'etc/catalyst/catalyst.conf') |
77 | 83 |
|
78 | 84 | PORT_LOGDIR_CLEAN = \ |
79 | 85 | 'find "${PORT_LOGDIR}" -type f ! -name "summary.log*" -mtime +30 -delete' |
|
0 commit comments