diff options
author | 2010-04-22 17:43:59 +0000 | |
---|---|---|
committer | 2010-04-29 16:51:48 -0700 | |
commit | ef2024a33be93a256beef28c1423ba1fb706383d (patch) | |
tree | a1581fa88b7113338bbfd0ae4b545ec26a375f63 /pym | |
parent | Bail out immediately if --exclude is given a bad atom. (diff) | |
download | portage-idfetch-ef2024a33be93a256beef28c1423ba1fb706383d.tar.gz portage-idfetch-ef2024a33be93a256beef28c1423ba1fb706383d.tar.bz2 portage-idfetch-ef2024a33be93a256beef28c1423ba1fb706383d.zip |
Support per-package bashrc files.
Support loading per-package bashrc files from the /etc/portage/env
directory. The invidual files should reside in a directory matching
${CATEGORY}, with names matching ${PN}, ${PN}:${SLOT}, ${P} and/or ${PF}
(which are applied in that order).
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage/const.py | 1 | ||||
-rw-r--r-- | pym/portage/package/ebuild/config.py | 2 | ||||
-rw-r--r-- | pym/portage/package/ebuild/doebuild.py | 6 |
3 files changed, 6 insertions, 3 deletions
diff --git a/pym/portage/const.py b/pym/portage/const.py index 2c5e233f..445677bd 100644 --- a/pym/portage/const.py +++ b/pym/portage/const.py @@ -34,6 +34,7 @@ MODULES_FILE_PATH = USER_CONFIG_PATH + "/modules" CUSTOM_PROFILE_PATH = USER_CONFIG_PATH + "/profile" USER_VIRTUALS_FILE = USER_CONFIG_PATH + "/virtuals" EBUILD_SH_ENV_FILE = USER_CONFIG_PATH + "/bashrc" +EBUILD_SH_ENV_DIR = USER_CONFIG_PATH + "/env" CUSTOM_MIRRORS_FILE = USER_CONFIG_PATH + "/mirrors" COLOR_MAP_FILE = USER_CONFIG_PATH + "/color.map" PROFILE_PATH = "etc/make.profile" diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index dc7e1a85..db30c2c6 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -172,7 +172,7 @@ class config(object): "PKGDIR", "PKGUSE", "PKG_LOGDIR", "PKG_TMPDIR", "PORTAGE_ACTUAL_DISTDIR", "PORTAGE_ARCHLIST", - "PORTAGE_BASHRC", + "PORTAGE_BASHRC", "PM_EBUILD_HOOK_DIR", "PORTAGE_BINPKG_FILE", "PORTAGE_BINPKG_TAR_OPTS", "PORTAGE_BINPKG_TMPFILE", "PORTAGE_BIN_PATH", diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py index 9cf16cfe..531cb238 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -32,8 +32,8 @@ from portage import auxdbkeys, bsd_chflags, dep_check, \ eapi_is_supported, merge, os, selinux, StringIO, \ unmerge, _encodings, _parse_eapi_ebuild_head, _os_merge, \ _shell_quote, _split_ebuild_name_glep55, _unicode_decode, _unicode_encode -from portage.const import EBUILD_SH_ENV_FILE, EBUILD_SH_BINARY, \ - INVALID_ENV_FILE, MISC_SH_BINARY +from portage.const import EBUILD_SH_ENV_FILE, EBUILD_SH_ENV_DIR, \ + EBUILD_SH_BINARY, INVALID_ENV_FILE, MISC_SH_BINARY from portage.data import portage_gid, portage_uid, secpass, \ uid, userpriv_groups from portage.dbapi.virtual import fakedbapi @@ -211,6 +211,8 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, mysettings["PORTAGE_BASHRC"] = os.path.join( mysettings["PORTAGE_CONFIGROOT"], EBUILD_SH_ENV_FILE) + mysettings["PM_EBUILD_HOOK_DIR"] = os.path.join( + mysettings["PORTAGE_CONFIGROOT"], EBUILD_SH_ENV_DIR) mysettings["EBUILD_EXIT_STATUS_FILE"] = os.path.join( mysettings["PORTAGE_BUILDDIR"], ".exit_status") |