Make REPOSITORY variable again available in global scope of ebuilds,
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Thu, 10 May 2012 19:54:25 +0000 (21:54 +0200)
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Thu, 10 May 2012 19:54:25 +0000 (21:54 +0200)
which use EAPI="4-python".
This fixes regression introduced in commit 1c26d24dfc869a6f5ef426f7c02e1d25abcda34e.

pym/portage/package/ebuild/doebuild.py

index ad6857f7ee4e0980bc2fbcef0f74d059536be46b..faba9b696b9d58a6f8ebd9684879fd384677255e 100644 (file)
@@ -342,8 +342,10 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
        if not eapi_is_supported(eapi):
                raise UnsupportedAPIException(mycpv, eapi)
 
-       if mydo != "depend":
+       if eapi_exports_REPOSITORY(eapi) and "PORTAGE_REPO_NAME" in mysettings.configdict["pkg"]:
+               mysettings.configdict["pkg"]["REPOSITORY"] = mysettings.configdict["pkg"]["PORTAGE_REPO_NAME"]
 
+       if mydo != "depend":
                if hasattr(mydbapi, "getFetchMap") and \
                        ("A" not in mysettings.configdict["pkg"] or \
                        "AA" not in mysettings.configdict["pkg"]):
@@ -404,11 +406,6 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
                                mysettings["KV"] = ""
                        mysettings.backup_changes("KV")
 
-               if eapi_exports_REPOSITORY(eapi) and \
-                       "PORTAGE_REPO_NAME" in mysettings.configdict["pkg"]:
-                       mysettings.configdict["pkg"]["REPOSITORY"] = \
-                               mysettings.configdict["pkg"]["PORTAGE_REPO_NAME"]
-
 _doebuild_manifest_cache = None
 _doebuild_broken_ebuilds = set()
 _doebuild_broken_manifests = set()