From: Zac Medico Date: Fri, 22 Jun 2012 07:18:11 +0000 (-0700) Subject: getportageversion: handle repo: in parent file X-Git-Tag: v2.2.0_alpha111~18 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=003e95562216045408d8d2dd09afeac2311383fc;p=portage.git getportageversion: handle repo: in parent file --- diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index a689b7b1a..7ad28e62d 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -2807,6 +2807,7 @@ def relative_profile_path(portdir, abs_profile): def getportageversion(portdir, _unused, profile, chost, vardb): profilever = None + repositories = vardb.settings.repositories if profile: profilever = relative_profile_path(portdir, profile) if profilever is None: @@ -2817,6 +2818,20 @@ def getportageversion(portdir, _unused, profile, chost, vardb): os.path.join(profile, parent)) if profilever is not None: break + colon = parent.find(":") + if colon != -1: + p_repo_name = parent[:colon] + try: + p_repo_loc = \ + repositories.get_location_for_name(p_repo_name) + except KeyError: + pass + else: + profilever = relative_profile_path(p_repo_loc, + os.path.join(p_repo_loc, 'profiles', + parent[colon+1:])) + if profilever is not None: + break except portage.exception.PortageException: pass