FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Portage Developer

 
 
LinkBack Thread Tools
 
Old 05-12-2008, 06:53 PM
Fabian Groffen
 
Default show binhosts as "repository"

The following patch shows the url to the binhost in an emerge -av as
repository name, instead of "unknown". Unfortunately the patch doesn't
store the binhost url, such that portage can't show where the package
comes from when unmerged.

--
Fabian Groffen
Gentoo on a different level
--- ../../trunk/pym/_emerge/__init__.py 2008-05-12 19:25:21 +0200
+++ ./pym/_emerge/__init__.py 2008-05-12 17:16:49 +0200
@@ -1117,6 +1126,6 @@
pkg_chost = pkg.metadata.get("CHOST")
if pkg_chost and pkg_chost != pkgsettings["CHOST"]:
return False
if not portage.eapi_is_supported(pkg.metadata["EAPI"]):
return False
if not pkg.installed and
@@ -4447,13 +4471,18 @@
pkg = x
metadata = pkg.metadata
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
raise portage.exception.PackageNotFound(pkg_key)
repo_path_real = os.path.dirname(os.path.dirname(
os.path.dirname(ebuild_path)))
+ elif pkg_type == "binary":
+ repo_path_real = repo_name
else:
repo_path_real = portdb.getRepositoryPath(repo_name)
pkg_use = metadata["USE"].split()
@@ -5422,6 +5451,11 @@
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
 
Old 05-13-2008, 10:45 PM
Marius Mauch
 
Default show binhosts as "repository"

On Mon, 12 May 2008 20:53:35 +0200
Fabian Groffen <grobian@gentoo.org> wrote:

> The following patch shows the url to the binhost in an emerge -av as
> repository name, instead of "unknown". Unfortunately the patch
> doesn't store the binhost url, such that portage can't show where the
> package comes from when unmerged.

Not sure if this is the right thing to do, or if the reponame in those
cases should be the one from the source repo that was used to generate
those binary packages. Not saying that the binhost name here is
useless, quite the opposite, just a bit concerned about mixing
different things here.

Marius

--
Public Key at http://www.genone.de/info/gpg-key.pub

In the beginning, there was nothing. And God said, 'Let there be
Light.' And there was still nothing, but you could see a bit better.
 
Old 05-14-2008, 08:06 AM
Fabian Groffen
 
Default show binhosts as "repository"

On 14-05-2008 00:45:10 +0200, Marius Mauch wrote:
> On Mon, 12 May 2008 20:53:35 +0200
> Fabian Groffen <grobian@gentoo.org> wrote:
>
> > The following patch shows the url to the binhost in an emerge -av as
> > repository name, instead of "unknown". Unfortunately the patch
> > doesn't store the binhost url, such that portage can't show where the
> > package comes from when unmerged.
>
> Not sure if this is the right thing to do, or if the reponame in those
> cases should be the one from the source repo that was used to generate
> those binary packages. Not saying that the binhost name here is
> useless, quite the opposite, just a bit concerned about mixing
> different things here.

The idea behind it is that the repo_name of the binhost is not
necessarily useful. In many cases it will contain the default repo_name
value, since people just create binpkgs with a standard Portage install.

I agree it is a hack. Perhaps a combination of the repo_name and its
url would be the best.


--
Fabian Groffen
Gentoo on a different level
--
gentoo-portage-dev@lists.gentoo.org mailing list
 

Thread Tools




All times are GMT. The time now is 08:51 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org