From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 0C73113838B for ; Mon, 6 Oct 2014 17:38:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 39609E0954; Mon, 6 Oct 2014 17:38:04 +0000 (UTC) Received: from mail-yh0-f54.google.com (mail-yh0-f54.google.com [209.85.213.54]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 62103E0952 for ; Mon, 6 Oct 2014 17:38:03 +0000 (UTC) Received: by mail-yh0-f54.google.com with SMTP id z6so2056523yhz.13 for ; Mon, 06 Oct 2014 10:38:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=yEUkfgP+BeUrvsetAAOwxkFfS6XUv+uJQe/ftxjzEEo=; b=SfYv+N19pNoH9B60hUDlKom7zujji4mvCIrO3b+swXTcJdq9t5P6G6ZVwVXxl/0MZ7 Nq6L3WbJt3+Bj1VZWvDYbCSEejEgWtprqpzQsOwXIuXPerqgVbDKEDiFAkCkpuz0CQhG dAnR3Pz4Q7HPEjpK9Km7pfGxN1vHZUks4NUs8WbpGMiHsWks2RJ+dgx3EYE9kk0Hxb78 /+BAYRiNeacIcVGOuIf2xo67EbhfE+KBToW+Sj6kOldYgKzj1yNkrEyLtKrpsZEX6gtX C4TvDi1mq9XGqp1MS7IhocmEn9Z5L5Xj0T2jWnv7CJYcr56W6CchGIleXy0dpam2qIS4 XOlg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=yEUkfgP+BeUrvsetAAOwxkFfS6XUv+uJQe/ftxjzEEo=; b=UdQ7nAMfriCKJsQEhjQqEBiTd/ShU0lbpcBzbKlbDE/HGeqqBbwj0Y8TbM4xlPhVru c4mVTv5aZ89G2iAeTeYBp/FI7m5I6uACPS9uwGQZcDBxXjLNIDFnL8oqgK3AXUOjfQ3n P5OZZ3qH8o+zvtc+PdQBpLRFh+D/wKw+rDhOo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=yEUkfgP+BeUrvsetAAOwxkFfS6XUv+uJQe/ftxjzEEo=; b=d558HZD0jCbCBNyBxir+7prRcB3cdcj5wuTREJj0jdPQWEoQaWWj4q5MxBMBODv/e6 A2NtXS6Nn5/RZEcGpIINDy3+ojvIJ+hrqDzA4iOtd2ogSTrYSlatVXFbrSHE4gK/cod6 Ky7GuSIIulpm0KfVhwtOb9OJYwJ71CKgwLTmU3eso5wKLYZ5EVxAqRnycXLkmvo/eD4K BH/HCNPf1v+BG+fG+Y/hRi77DGETdQdv4Il5g3tPGr89VyG5shQljTiZFLpzvH2o/jkU LsO1z8bUKK+3kyjYz0zs1cyJvKrrlSSpglBNG8elgHazmacx7L/Z3JbFM/5nmIKUcsdU WL/w== X-Gm-Message-State: ALoCoQn+LsV6MKhC0xyqRLanZhCsRxoU7aEijhanNX+g4OwcqMzkSrwYR92FpQ1i9mDLSzjeoOnb Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 X-Received: by 10.236.175.194 with SMTP id z42mr38725975yhl.89.1412617082074; Mon, 06 Oct 2014 10:38:02 -0700 (PDT) Sender: bsimonnet@google.com Received: by 10.170.147.137 with HTTP; Mon, 6 Oct 2014 10:38:01 -0700 (PDT) In-Reply-To: References: <5425944A.2090404@gentoo.org> <1412029913-13421-1-git-send-email-bsimonnet@chromium.org> <1412029913-13421-2-git-send-email-bsimonnet@chromium.org> <1412029913-13421-3-git-send-email-bsimonnet@chromium.org> <1412029913-13421-4-git-send-email-bsimonnet@chromium.org> Date: Mon, 6 Oct 2014 10:38:01 -0700 X-Google-Sender-Auth: c85yglRs_NZqNlnWYBnI4e-le4k Message-ID: Subject: [gentoo-portage-dev] Re: [PATCH 3/3] package.bashrc: per profile, per-package bashrc mechanism From: Bertrand Simonnet To: gentoo-portage-dev@lists.gentoo.org Content-Type: multipart/alternative; boundary=20cf303f636a6198250504c48b50 X-Archives-Salt: 5f170540-2e99-4ca5-bea7-a83886a2309b X-Archives-Hash: cbc29fd7856fde886366c1938b698c29 --20cf303f636a6198250504c48b50 Content-Type: text/plain; charset=UTF-8 Michal, Zac, did you have time to look at this serie of patches ? Bertrand On Tue, Sep 30, 2014 at 3:16 PM, Bertrand Simonnet wrote: > Please discard the last serie of patches. git send-email was not > configured correctly and some commands I typed yesterday are being send > now. > Sorry about that. > > Bertrand > > On Mon, Sep 29, 2014 at 3:31 PM, Bertrand SIMONNET > wrote: > >> Profiles can define per-package bashrc files to be sourced before >> emerging. >> Each line in package.bashrc must be an atom name then a list of >> space-delimited >> bashrc files (stored in $profile/bashrc/). >> --- >> bin/ebuild.sh | 6 ++-- >> bin/phase-functions.sh | 2 +- >> bin/save-ebuild-env.sh | 2 +- >> man/portage.5 | 30 >> +++++++++++++++++- >> .../package/ebuild/_config/special_env_vars.py | 4 +-- >> pym/portage/package/ebuild/config.py | 36 >> ++++++++++++++++++++++ >> pym/portage/package/ebuild/doebuild.py | 4 ++- >> pym/portage/repository/config.py | 2 +- >> 8 files changed, 76 insertions(+), 10 deletions(-) >> >> diff --git a/bin/ebuild.sh b/bin/ebuild.sh >> index 14cc321..50909e1 100755 >> --- a/bin/ebuild.sh >> +++ b/bin/ebuild.sh >> @@ -368,10 +368,10 @@ __source_all_bashrcs() { >> # source the existing profile.bashrcs. >> save_IFS >> IFS=$'\n' >> - local path_array=($PROFILE_PATHS) >> + local bashenv_files=($PORTAGE_BASHRC_FILES) >> restore_IFS >> - for x in "${path_array[@]}" ; do >> - [ -f "$x/profile.bashrc" ] && __qa_source >> "$x/profile.bashrc" >> + for x in "${bashenv_files[@]}" ; do >> + __try_source "${x}" >> done >> fi >> >> diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh >> index f39a024..5dff3bb 100644 >> --- a/bin/phase-functions.sh >> +++ b/bin/phase-functions.sh >> @@ -31,7 +31,7 @@ PORTAGE_READONLY_VARS="D EBUILD EBUILD_PHASE >> EBUILD_PHASE_FUNC \ >> PORTAGE_TMPDIR PORTAGE_UPDATE_ENV PORTAGE_USERNAME \ >> PORTAGE_VERBOSE PORTAGE_WORKDIR_MODE PORTAGE_XATTR_EXCLUDE \ >> PORTDIR \ >> - PROFILE_PATHS REPLACING_VERSIONS REPLACED_BY_VERSION T WORKDIR \ >> + REPLACING_VERSIONS REPLACED_BY_VERSION T WORKDIR \ >> __PORTAGE_HELPER __PORTAGE_TEST_HARDLINK_LOCKS" >> >> PORTAGE_SAVED_READONLY_VARS="A CATEGORY P PF PN PR PV PVR" >> diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh >> index f114c48..1a684b9 100644 >> --- a/bin/save-ebuild-env.sh >> +++ b/bin/save-ebuild-env.sh >> @@ -97,7 +97,7 @@ __save_ebuild_env() { >> GOOD HILITE HOME \ >> LAST_E_CMD LAST_E_LEN LD_PRELOAD MISC_FUNCTIONS_ARGS >> MOPREFIX \ >> NOCOLOR NORMAL PKGDIR PKGUSE PKG_LOGDIR PKG_TMPDIR \ >> - PORTAGE_BASHRCS_SOURCED PORTAGE_COMPRESS \ >> + PORTAGE_BASHRC_FILES PORTAGE_BASHRCS_SOURCED >> PORTAGE_COMPRESS \ >> PORTAGE_COMPRESS_EXCLUDE_SUFFIXES \ >> PORTAGE_DOHTML_UNWARNED_SKIPPED_EXTENSIONS \ >> PORTAGE_DOHTML_UNWARNED_SKIPPED_FILES \ >> diff --git a/man/portage.5 b/man/portage.5 >> index e399f0f..309e259 100644 >> --- a/man/portage.5 >> +++ b/man/portage.5 >> @@ -24,6 +24,7 @@ make.defaults >> packages >> packages.build >> package.accept_keywords >> +package.bashrc >> package.keywords >> package.mask >> package.provided >> @@ -358,6 +359,31 @@ a '\-'. >> A list of packages (one per line) that make up a stage1 tarball. Really >> only >> useful for stage builders. >> .TP >> +.BR package.bashrc >> +Per-package bashrc mechanism. Contains a list of bashrc files to be >> sourced >> +before emerging a given atom. The bashrc files must be stored in >> bashrc/, in >> +the profile directory. >> + >> +.I Note: >> +.nf >> +\- The bashrc files will be sourced after profile.bashrc for the same >> profile. >> +\- profile-formats in metadata/layout.conf must contain profile-bashrcs >> for this >> +to be enabled. >> +.fi >> + >> +.I Format: >> +.nf >> +\- comments begin with # (no inline comments). >> +\- one atom per line with space-delimited list of bashrc files. >> +.fi >> + >> +.I Example: >> +.nf >> +# By setting INSTALL_MASK in bashrc/nostandardconf.conf, we can avoid >> installing >> +# the standard configuration and enable another package to install it. >> +net-misc/dhcp nostardardconf.conf >> +.fi >> +.TP >> .BR package.provided >> A list of packages (one per line) that portage should assume have been >> provided. Useful for porting to non-Linux systems. Basically, it's a >> @@ -1047,11 +1073,13 @@ The default setting for repoman's --echangelog >> option. >> The cache formats supported in the metadata tree. There is the old >> "pms" format >> and the newer/faster "md5-dict" format. Default is to detect dirs. >> .TP >> -.BR profile\-formats " = [pms|portage-1|portage-2]" >> +.BR profile\-formats " = [pms|portage-1|portage-2|profile-bashrcs]" >> Control functionality available to profiles in this repo such as which >> files >> may be dirs, or the syntax available in parent files. Use "portage-2" >> if you're >> unsure. The default is "portage-1-compat" mode which is meant to be >> compatible >> with old profiles, but is not allowed to be opted into directly. >> +Setting profile-bashrcs will enable the per-profile bashrc mechanism >> +\fBpackage.bashrc\fR. >> .RE >> .RE >> >> diff --git a/pym/portage/package/ebuild/_config/special_env_vars.py >> b/pym/portage/package/ebuild/_config/special_env_vars.py >> index 74fedd6..387f4ae 100644 >> --- a/pym/portage/package/ebuild/_config/special_env_vars.py >> +++ b/pym/portage/package/ebuild/_config/special_env_vars.py >> @@ -49,7 +49,7 @@ environ_whitelist += [ >> "FEATURES", "FILESDIR", "HOME", "MERGE_TYPE", "NOCOLOR", "PATH", >> "PKGDIR", >> "PKGUSE", "PKG_LOGDIR", "PKG_TMPDIR", >> - "PORTAGE_ACTUAL_DISTDIR", "PORTAGE_ARCHLIST", >> + "PORTAGE_ACTUAL_DISTDIR", "PORTAGE_ARCHLIST", >> "PORTAGE_BASHRC_FILES", >> "PORTAGE_BASHRC", "PM_EBUILD_HOOK_DIR", >> "PORTAGE_BINPKG_FILE", "PORTAGE_BINPKG_TAR_OPTS", >> "PORTAGE_BINPKG_TMPFILE", >> @@ -74,7 +74,7 @@ environ_whitelist += [ >> "PORTAGE_SIGPIPE_STATUS", >> "PORTAGE_TMPDIR", "PORTAGE_UPDATE_ENV", "PORTAGE_USERNAME", >> "PORTAGE_VERBOSE", "PORTAGE_WORKDIR_MODE", >> "PORTAGE_XATTR_EXCLUDE", >> - "PORTDIR", "PORTDIR_OVERLAY", "PREROOTPATH", "PROFILE_PATHS", >> + "PORTDIR", "PORTDIR_OVERLAY", "PREROOTPATH", >> "REPLACING_VERSIONS", "REPLACED_BY_VERSION", >> "ROOT", "ROOTPATH", "T", "TMP", "TMPDIR", >> "USE_EXPAND", "USE_ORDER", "WORKDIR", >> diff --git a/pym/portage/package/ebuild/config.py >> b/pym/portage/package/ebuild/config.py >> index f639e14..183627f 100644 >> --- a/pym/portage/package/ebuild/config.py >> +++ b/pym/portage/package/ebuild/config.py >> @@ -316,6 +316,7 @@ class config(object): >> self._accept_restrict = >> copy.deepcopy(clone._accept_restrict) >> self._paccept_restrict = >> copy.deepcopy(clone._paccept_restrict) >> self._penvdict = copy.deepcopy(clone._penvdict) >> + self._pbashrcdict = >> copy.deepcopy(clone._pbashrcdict) >> self._expand_map = >> copy.deepcopy(clone._expand_map) >> >> else: >> @@ -661,6 +662,7 @@ class config(object): >> self._ppropertiesdict = >> portage.dep.ExtendedAtomDict(dict) >> self._paccept_restrict = >> portage.dep.ExtendedAtomDict(dict) >> self._penvdict = >> portage.dep.ExtendedAtomDict(dict) >> + self._pbashrcdict = {} >> >> self._repo_make_defaults = {} >> for repo in >> self.repositories.repos_with_profiles(): >> @@ -742,6 +744,25 @@ class config(object): >> for k, v in penvdict.items(): >> self._penvdict.setdefault(k.cp, >> {})[k] = v >> >> + # package.bashrc >> + for profile in profiles_complex: >> + if not 'profile-bashrcs' in >> profile.profile_formats: >> + continue >> + self._pbashrcdict[profile] = \ >> + >> portage.dep.ExtendedAtomDict(dict) >> + bashrc = >> grabdict_package(os.path.join(profile.location, >> + "package.bashrc"), >> recursive=1, allow_wildcard=True, >> + >> allow_repo=True, verify_eapi=False) >> + if not bashrc: >> + continue >> + >> + for k, v in bashrc.items(): >> + envfiles = >> [os.path.join(profile.location, >> + "bashrc", >> + envname) for >> envname in v] >> + >> self._pbashrcdict[profile].setdefault(k.cp, {})\ >> + .setdefault(k, >> []).extend(envfiles) >> + >> #getting categories from an external file now >> self.categories = [grabfile(os.path.join(x, >> "categories")) \ >> for x in >> locations_manager.profile_and_user_locations] >> @@ -1501,6 +1522,21 @@ class config(object): >> for x in penv_matches: >> self._penv.extend(x) >> >> + bashrc_files = [] >> + >> + for profile in self._locations_manager.profiles_complex: >> + bashrc_files.append(os.path.join(profile.location, >> + 'profile.bashrc')) >> + if profile in self._pbashrcdict: >> + cpdict = >> self._pbashrcdict[profile].get(cp) >> + if cpdict: >> + bashrc_matches = \ >> + >> ordered_by_atom_specificity(cpdict, cpv_slot) >> + for x in bashrc_matches: >> + bashrc_files.extend(x) >> + >> + self.configdict["BASHRC_FILES"] = bashrc_files >> + >> protected_pkg_keys = set(pkg_configdict) >> protected_pkg_keys.discard('USE') >> >> diff --git a/pym/portage/package/ebuild/doebuild.py >> b/pym/portage/package/ebuild/doebuild.py >> index 01707ae..5224775 100644 >> --- a/pym/portage/package/ebuild/doebuild.py >> +++ b/pym/portage/package/ebuild/doebuild.py >> @@ -335,7 +335,9 @@ def doebuild_environment(myebuild, mydo, myroot=None, >> settings=None, >> mysettings["ECLASSDIR"] = mysettings["PORTDIR"]+"/eclass" >> mysettings["SANDBOX_LOG"] = mycpv.replace("/", "_-_") >> >> - mysettings["PROFILE_PATHS"] = "\n".join(mysettings.profiles) >> + mysettings["PORTAGE_BASHRC_FILES"] = \ >> + "\n".join(mysettings.configdict["BASHRC_FILES"]) >> + >> mysettings["P"] = mysplit[0]+"-"+mysplit[1] >> mysettings["PN"] = mysplit[0] >> mysettings["PV"] = mysplit[1] >> diff --git a/pym/portage/repository/config.py >> b/pym/portage/repository/config.py >> index 5e0d055..bef643d 100644 >> --- a/pym/portage/repository/config.py >> +++ b/pym/portage/repository/config.py >> @@ -40,7 +40,7 @@ if sys.hexversion >= 0x3000000: >> _invalid_path_char_re = re.compile(r'[^a-zA-Z0-9._\-+:/]') >> >> _valid_profile_formats = frozenset( >> - ['pms', 'portage-1', 'portage-2']) >> + ['pms', 'portage-1', 'portage-2', 'profile-bashrcs']) >> >> _portage1_profiles_allow_directories = frozenset( >> ["portage-1-compat", "portage-1", 'portage-2']) >> -- >> 2.1.0.rc2.206.gedb03e5 >> >> > --20cf303f636a6198250504c48b50 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Michal, Zac, did you have time to look at this serie of pa= tches ?

Bertrand
<= br>
On Tue, Sep 30, 2014 at 3:16 PM, Bertrand Sim= onnet <bsimonnet@chromium.org> wrote:
Please discard the last serie of patches.= git send-email was not configured correctly and some commands =C2=A0I type= d yesterday are being send now.
Sorry about that.

Bertrand

On Mon, Sep 29, 2014 at 3:31 PM, Bertrand = SIMONNET <bsimonnet@chromium.org> wrote:
Profiles can define per-package bashrc files to b= e sourced before emerging.
Each line in package.bashrc must be an atom name then a list of space-delim= ited
bashrc files (stored in $profile/bashrc/).
---
=C2=A0bin/ebuild.sh=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 |=C2=A0 6 ++--
=C2=A0bin/phase-functions.sh=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 2 +-
=C2=A0bin/save-ebuild-env.sh=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 2 +-
=C2=A0man/portage.5=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 | 30 +++++++++++++++++-
=C2=A0.../package/ebuild/_config/special_env_vars.py=C2=A0 =C2= =A0 =C2=A0|=C2=A0 4 +--
=C2=A0pym/portage/package/ebuild/config.py=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0| 36 ++++++++++++++++++++++
=C2=A0pym/portage/package/ebuild/doebuild.py=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0|=C2=A0 4 ++-
=C2=A0pym/portage/repository/config.py=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 2 +-
=C2=A08 files changed, 76 insertions(+), 10 deletions(-)

diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 14cc321..50909e1 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -368,10 +368,10 @@ __source_all_bashrcs() {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # source the existi= ng profile.bashrcs.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 save_IFS
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 IFS=3D$'\n'=
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0local path_array=3D= ($PROFILE_PATHS)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0local bashenv_files= =3D($PORTAGE_BASHRC_FILES)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 restore_IFS
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0for x in "${pa= th_array[@]}" ; do
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0[ -f "$x/profile.bashrc" ] && __qa_source "= ;$x/profile.bashrc"
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0for x in "${ba= shenv_files[@]}" ; do
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0__try_source "${x}"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 done
=C2=A0 =C2=A0 =C2=A0 =C2=A0 fi

diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
index f39a024..5dff3bb 100644
--- a/bin/phase-functions.sh
+++ b/bin/phase-functions.sh
@@ -31,7 +31,7 @@ PORTAGE_READONLY_VARS=3D"D EBUILD EBUILD_PHASE EBUIL= D_PHASE_FUNC \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 PORTAGE_TMPDIR PORTAGE_UPDATE_ENV PORTAGE_USERN= AME \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 PORTAGE_VERBOSE PORTAGE_WORKDIR_MODE PORTAGE_XA= TTR_EXCLUDE \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 PORTDIR \
-=C2=A0 =C2=A0 =C2=A0 =C2=A0PROFILE_PATHS REPLACING_VERSIONS REPLACED_BY_VE= RSION T WORKDIR \
+=C2=A0 =C2=A0 =C2=A0 =C2=A0REPLACING_VERSIONS REPLACED_BY_VERSION T WORKDI= R \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 __PORTAGE_HELPER __PORTAGE_TEST_HARDLINK_LOCKS&= quot;

=C2=A0PORTAGE_SAVED_READONLY_VARS=3D"A CATEGORY P PF PN PR PV PVR"= ;
diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh
index f114c48..1a684b9 100644
--- a/bin/save-ebuild-env.sh
+++ b/bin/save-ebuild-env.sh
@@ -97,7 +97,7 @@ __save_ebuild_env() {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 GOOD HILITE HOME \<= br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 LAST_E_CMD LAST_E_L= EN LD_PRELOAD MISC_FUNCTIONS_ARGS MOPREFIX \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 NOCOLOR NORMAL PKGD= IR PKGUSE PKG_LOGDIR PKG_TMPDIR \
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0PORTAGE_BASHRCS_SOU= RCED PORTAGE_COMPRESS \
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0PORTAGE_BASHRC_FILE= S PORTAGE_BASHRCS_SOURCED PORTAGE_COMPRESS \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PORTAGE_COMPRESS_EX= CLUDE_SUFFIXES \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PORTAGE_DOHTML_UNWA= RNED_SKIPPED_EXTENSIONS \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PORTAGE_DOHTML_UNWA= RNED_SKIPPED_FILES \
diff --git a/man/portage.5 b/man/portage.5
index e399f0f..309e259 100644
--- a/man/portage.5
+++ b/man/portage.5
@@ -24,6 +24,7 @@ make.defaults
=C2=A0packages
=C2=A0packages.build
=C2=A0package.accept_keywords
+package.bashrc
=C2=A0package.keywords
=C2=A0package.mask
=C2=A0package.provided
@@ -358,6 +359,31 @@ a '\-'.
=C2=A0A list of packages (one per line) that make up a stage1 tarball.=C2= =A0 Really only
=C2=A0useful for stage builders.
=C2=A0.TP
+.BR package.bashrc
+Per-package bashrc mechanism.=C2=A0 Contains a list of bashrc files to be = sourced
+before emerging a given atom.=C2=A0 The bashrc files must be stored in bas= hrc/, in
+the profile directory.
+
+.I Note:
+.nf
+\- The bashrc files will be sourced after profile.bashrc for the same prof= ile.
+\- profile-formats in metadata/layout.conf must contain profile-bashrcs fo= r this
+to be enabled.
+.fi
+
+.I Format:
+.nf
+\- comments begin with # (no inline comments).
+\- one atom per line with space-delimited list of bashrc files.
+.fi
+
+.I Example:
+.nf
+# By setting INSTALL_MASK in bashrc/nostandardconf.conf, we can avoid inst= alling
+# the standard configuration and enable another package to install it.
+net-misc/dhcp nostardardconf.conf
+.fi
+.TP
=C2=A0.BR package.provided
=C2=A0A list of packages (one per line) that portage should assume have bee= n
=C2=A0provided.=C2=A0 Useful for porting to non-Linux systems. Basically, i= t's a
@@ -1047,11 +1073,13 @@ The default setting for repoman's --echangelog = option.
=C2=A0The cache formats supported in the metadata tree.=C2=A0 There is the = old "pms" format
=C2=A0and the newer/faster "md5-dict" format.=C2=A0 Default is to= detect dirs.
=C2=A0.TP
-.BR profile\-formats " =3D [pms|portage-1|portage-2]"
+.BR profile\-formats " =3D [pms|portage-1|portage-2|profile-bashrcs]&= quot;
=C2=A0Control functionality available to profiles in this repo such as whic= h files
=C2=A0may be dirs, or the syntax available in parent files.=C2=A0 Use "= ;portage-2" if you're
=C2=A0unsure.=C2=A0 The default is "portage-1-compat" mode which = is meant to be compatible
=C2=A0with old profiles, but is not allowed to be opted into directly.
+Setting profile-bashrcs will enable the per-profile bashrc mechanism
+\fBpackage.bashrc\fR.
=C2=A0.RE
=C2=A0.RE

diff --git a/pym/portage/package/ebuild/_config/speci= al_env_vars.py b/pym/portage/package/ebuild/_config/special_env_vars.py
index 74fedd6..387f4ae 100644
--- a/pym/portage/package/ebuild/_config/special_env_vars.py
+++ b/pym/portage/package/ebuild/_config/special_env_vars.py
@@ -49,7 +49,7 @@ environ_whitelist +=3D [
=C2=A0 =C2=A0 =C2=A0 =C2=A0 "FEATURES", "FILESDIR", &qu= ot;HOME", "MERGE_TYPE", "NOCOLOR", "PATH"= ;,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 "PKGDIR",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 "PKGUSE", "PKG_LOGDIR", &qu= ot;PKG_TMPDIR",
-=C2=A0 =C2=A0 =C2=A0 =C2=A0"PORTAGE_ACTUAL_DISTDIR", "PORTA= GE_ARCHLIST",
+=C2=A0 =C2=A0 =C2=A0 =C2=A0"PORTAGE_ACTUAL_DISTDIR", "PORTA= GE_ARCHLIST", "PORTAGE_BASHRC_FILES",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 "PORTAGE_BASHRC", "PM_EBUILD_HOO= K_DIR",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 "PORTAGE_BINPKG_FILE", "PORTAGE_= BINPKG_TAR_OPTS",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 "PORTAGE_BINPKG_TMPFILE",
@@ -74,7 +74,7 @@ environ_whitelist +=3D [
=C2=A0 =C2=A0 =C2=A0 =C2=A0 "PORTAGE_SIGPIPE_STATUS",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 "PORTAGE_TMPDIR", "PORTAGE_UPDAT= E_ENV", "PORTAGE_USERNAME",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 "PORTAGE_VERBOSE", "PORTAGE_WORK= DIR_MODE", "PORTAGE_XATTR_EXCLUDE",
-=C2=A0 =C2=A0 =C2=A0 =C2=A0"PORTDIR", "PORTDIR_OVERLAY"= ;, "PREROOTPATH", "PROFILE_PATHS",
+=C2=A0 =C2=A0 =C2=A0 =C2=A0"PORTDIR", "PORTDIR_OVERLAY"= ;, "PREROOTPATH",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 "REPLACING_VERSIONS", "REPLACED_= BY_VERSION",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 "ROOT", "ROOTPATH", "T= ", "TMP", "TMPDIR",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 "USE_EXPAND", "USE_ORDER", = "WORKDIR",
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebu= ild/config.py
index f639e14..183627f 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -316,6 +316,7 @@ class config(object):
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 self._accept_restrict =3D copy.deepcopy(clone._accept_restrict)<= br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 self._paccept_restrict =3D copy.deepcopy(clone._paccept_restrict= )
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 self._penvdict =3D copy.deepcopy(clone._penvdict)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0self._pbashrcdict =3D copy.deepcopy(clone._pbashrcdict)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 self._expand_map =3D copy.deepcopy(clone._expand_map)

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 else:
@@ -661,6 +662,7 @@ class config(object):
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 self._ppropertiesdict =3D portage.dep.ExtendedAtomDict(dict)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 self._paccept_restrict =3D portage.dep.ExtendedAtomDict(dict) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 self._penvdict =3D portage.dep.ExtendedAtomDict(dict)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0self._pbashrcdict =3D {}

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 self._repo_make_defaults =3D {}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 for repo in self.repositories.repos_with_profiles():
@@ -742,6 +744,25 @@ class config(object):
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 for k, v in penvdict.items():
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self._pe= nvdict.setdefault(k.cp, {})[k] =3D v

+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# package.bashrc
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0for profile in profiles_complex:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if not &#= 39;profile-bashrcs' in profile.profile_formats:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0continue
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self._pba= shrcdict[profile] =3D \
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0portage.dep.ExtendedAtomDict(dict)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bashrc = =3D grabdict_package(os.path.join(profile.location,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0"package.bashrc"), recursive=3D1, allow_wildc= ard=3DTrue,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0allow_repo=3DTrue, verify_eapi=3DFalse)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if not ba= shrc:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0continue
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0for k, v = in bashrc.items():
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0envfiles =3D [os.path.join(profile.location,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"bashrc",
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0envname) for envname in v]<= br> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0self._pbashrcdict[profile].setdefault(k.cp, {})\
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0.setdefault(k, []).extend(e= nvfiles)
+
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 #getting categories from an external file now
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 self.categories =3D [grabfile(os.path.join(x, "categories&q= uot;)) \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 for x in locations_manager.profile_a= nd_user_locations]
@@ -1501,6 +1522,21 @@ class config(object):
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 for x in penv_matches:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self._pe= nv.extend(x)

+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bashrc_files =3D []=
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0for profile in self= ._locations_manager.profiles_complex:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0bashrc_files.append(os.path.join(profile.location,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'profile.bashrc'))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0if profile in self._pbashrcdict:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cpdict =3D self._pbashrcdict[profile]= .get(cp)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if cpdict:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bashrc_ma= tches =3D \
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0ordered_by_atom_specificity(cpdict, cpv_slot)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0for x in = bashrc_matches:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0bashrc_files.extend(x)
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self.configdict[&qu= ot;BASHRC_FILES"] =3D bashrc_files
+
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 protected_pkg_keys = =3D set(pkg_configdict)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 protected_pkg_keys.= discard('USE')

diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/e= build/doebuild.py
index 01707ae..5224775 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -335,7 +335,9 @@ def doebuild_environment(myebuild, mydo, myroot=3DNone,= settings=3DNone,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 mysettings["ECLASSDIR"]=C2=A0 =C2=A0= =3D mysettings["PORTDIR"]+"/eclass"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 mysettings["SANDBOX_LOG"] =3D mycpv.r= eplace("/", "_-_")

-=C2=A0 =C2=A0 =C2=A0 =C2=A0mysettings["PROFILE_PATHS"] =3D "= ;\n".join(mysettings.profiles)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0mysettings["PORTAGE_BASHRC_FILES"] = =3D \
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"\n".join= (mysettings.configdict["BASHRC_FILES"])
+
=C2=A0 =C2=A0 =C2=A0 =C2=A0 mysettings["P"]=C2=A0 =3D mysplit[0]+= "-"+mysplit[1]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 mysettings["PN"] =3D mysplit[0]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 mysettings["PV"] =3D mysplit[1]
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/conf= ig.py
index 5e0d055..bef643d 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -40,7 +40,7 @@ if sys.hexversion >=3D 0x3000000:
=C2=A0_invalid_path_char_re =3D re.compile(r'[^a-zA-Z0-9._\-+:/]')<= br>
=C2=A0_valid_profile_formats =3D frozenset(
-=C2=A0 =C2=A0 =C2=A0 =C2=A0['pms', 'portage-1', 'porta= ge-2'])
+=C2=A0 =C2=A0 =C2=A0 =C2=A0['pms', 'portage-1', 'porta= ge-2', 'profile-bashrcs'])

=C2=A0_portage1_profiles_allow_directories =3D frozenset(
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ["portage-1-compat", "portage-1&= quot;, 'portage-2'])
--
2.1.0.rc2.206.gedb03e5



--20cf303f636a6198250504c48b50--