diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-01-09 11:19:07 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-01-09 11:19:07 +0000 |
commit | 1a9726b31cc0326ede10a45b02294931d1db7473 (patch) | |
tree | a5367a5884f593c245e336f02d909411a2568ad1 /pym/portage | |
parent | 6afefabfb5f442a6844cf60664bf0516f661106d (diff) | |
download | portage-1a9726b31cc0326ede10a45b02294931d1db7473.tar.gz portage-1a9726b31cc0326ede10a45b02294931d1db7473.tar.bz2 portage-1a9726b31cc0326ede10a45b02294931d1db7473.zip |
Make die() to show a message indicating the repository that an ebuild came
from, and do it during any phase for both ebuilds and binary packages. Now
PORTAGE_REPO_NAME is initialized inside config.setcpv() for both ebuilds
and binary packages, so it's always available inside ebuild.sh.
svn path=/main/trunk/; revision=12402
Diffstat (limited to 'pym/portage')
-rw-r--r-- | pym/portage/__init__.py | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 2c8072878..f5207b8b2 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -917,7 +917,7 @@ class config(object): _env_blacklist = [ "A", "AA", "CATEGORY", "EBUILD_PHASE", "EMERGE_FROM", "PF", "PKGUSE", "PORTAGE_CONFIGROOT", "PORTAGE_IUSE", - "PORTAGE_USE", "ROOT" + "PORTAGE_REPO_NAME", "PORTAGE_USE", "ROOT" ] _environ_whitelist = [] @@ -1921,8 +1921,12 @@ class config(object): else: aux_keys = [k for k in auxdbkeys \ if not k.startswith("UNUSED_")] + aux_keys.append("repository") for k, v in izip(aux_keys, mydb.aux_get(self.mycpv, aux_keys)): pkg_configdict[k] = v + repository = pkg_configdict.pop("repository", None) + if repository is not None: + pkg_configdict["PORTAGE_REPO_NAME"] = repository for k in pkg_configdict: if k != "USE": env_configdict.pop(k, None) @@ -4761,17 +4765,6 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, m mysettings["ROOT"] = myroot mysettings["STARTDIR"] = getcwd() - - mysettings["PORTAGE_REPO_NAME"] = "" - # bindbapi has no getRepositories() method - if mydbapi and hasattr(mydbapi, "getRepositories"): - # do we have a origin repository name for the current package - repopath = os.sep.join(pkg_dir.split(os.path.sep)[:-2]) - for reponame in mydbapi.getRepositories(): - if mydbapi.getRepositoryPath(reponame) == repopath: - mysettings["PORTAGE_REPO_NAME"] = reponame - break - mysettings["EBUILD"] = ebuild_path mysettings["O"] = pkg_dir mysettings.configdict["pkg"]["CATEGORY"] = cat |