Use PORTAGE_BINHOST as repo_path(_real) such that instead of a ? for
authorFabian Groffen <grobian@gentoo.org>
Fri, 12 Oct 2007 11:36:32 +0000 (11:36 -0000)
committerFabian Groffen <grobian@gentoo.org>
Fri, 12 Oct 2007 11:36:32 +0000 (11:36 -0000)
repository, we show it's url to the binhost in use.

svn path=/main/branches/prefix/; revision=8083

pym/emerge/__init__.py

index 12b4d89d9bb7cbc3bf5a5f25133e6c649a72e2a1..a0c70fac6b8a151301846f0090081b7833ebcdeb 100644 (file)
@@ -3076,7 +3076,10 @@ class depgraph(object):
                                metadata = dict(izip(self._mydbapi_keys,
                                        mydbapi.aux_get(pkg_key, self._mydbapi_keys)))
                                ebuild_path = None
-                               repo_name = metadata["repository"]
+                               if pkg_type == "binary":
+                                       repo_name = self.roots[myroot].settings.get("PORTAGE_BINHOST")
+                               else:
+                                       repo_name = metadata["repository"]
                                if pkg_type == "ebuild":
                                        ebuild_path = portdb.findname(pkg_key)
                                        if not ebuild_path: # shouldn't happen
@@ -3086,7 +3089,7 @@ class depgraph(object):
                                        pkgsettings.setcpv(pkg_key, mydb=mydbapi)
                                        metadata["USE"] = pkgsettings["USE"]
                                else:
-                                       repo_path_real = portdb.getRepositoryPath(repo_name)
+                                       repo_path_real = repo_name
                                pkg_use = metadata["USE"].split()
                                try:
                                        restrict = flatten(use_reduce(paren_reduce(
@@ -3642,6 +3645,11 @@ class RepoDisplay(object):
                self._repo_paths_real = [ os.path.realpath(repo_path) \
                        for repo_path in repo_paths ]
 
+               if root_config.settings.get("PORTAGE_BINHOST"):
+                       binhost = root_config.settings.get("PORTAGE_BINHOST")
+                       self._repo_paths.append(binhost)
+                       self._repo_paths_real.append(binhost)
+
                # pre-allocate index for PORTDIR so that it always has index 0.
                for root_config in roots.itervalues():
                        portdb = root_config.trees["porttree"].dbapi