Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 519274 Details for
Bug 647076
PORTAGE_BINHOST lacks preference ordering now (FEATURES=-binpkg-multi-instance)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
ignore all but 1 package per cpv for multi-binhost
0001-binarytree-ignore-all-but-1-package-per-cpv-for-mult.patch (text/plain), 2.03 KB, created by
Zac Medico
on 2018-02-12 20:09:58 UTC
(
hide
)
Description:
ignore all but 1 package per cpv for multi-binhost
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2018-02-12 20:09:58 UTC
Size:
2.03 KB
patch
obsolete
>From 8c8fa3ca346742229127875387d2b1116080bd65 Mon Sep 17 00:00:00 2001 >From: Zac Medico <zmedico@gentoo.org> >Date: Mon, 12 Feb 2018 12:04:43 -0800 >Subject: [PATCH] binarytree: ignore all but 1 package per cpv for > multi-binhost (bug 647076) > >Restore multi-binhost behavior prior to commit >328dd4712f88cbb8ef390ae9eb471afa1ef781d7, so that all but one package >per cpv is ignored. Binhosts specified later in PORTAGE_BINHOST will >override those that are specified later. This is the same behavior >as the original multi-binhost support that was added in commit >7f84548b516d30de43118d58e6bc03c8739a0967. >--- > pym/portage/dbapi/bintree.py | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > >diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py >index 201666c41..c40ed0635 100644 >--- a/pym/portage/dbapi/bintree.py >+++ b/pym/portage/dbapi/bintree.py >@@ -811,7 +811,10 @@ class binarytree(object): > > self._remote_has_index = False > self._remotepkgs = {} >- for base_url in self.settings["PORTAGE_BINHOST"].split(): >+ binhosts = self.settings["PORTAGE_BINHOST"].split() >+ # chromeos multi-binhost unique cpv logic >+ cpv_unique = {} if len(binhosts) > 1 else None >+ for base_url in binhosts: > parsed_url = urlparse(base_url) > host = parsed_url.netloc > port = parsed_url.port >@@ -1029,6 +1032,17 @@ class binarytree(object): > for d in pkgindex.packages: > cpv = _pkg_str(d["CPV"], metadata=d, > settings=self.settings) >+ current_key = self.dbapi._instance_key(cpv) >+ if cpv_unique is not None: >+ previous = cpv_unique.get(cpv) >+ if previous is not None: >+ # Delete previous instance with same cpv but >+ # different instance key. >+ previous_key = self.dbapi._instance_key(previous) >+ if previous_key != current_key: >+ self.dbapi.cpv_remove(previous) >+ del self._remotepkgs[previous_key] >+ cpv_unique[cpv] = cpv > # Local package instances override remote instances > # with the same instance_key. > if self.dbapi.cpv_exists(cpv): >-- >2.13.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 647076
: 519274