* [gentoo-portage-dev] [PATCH] BlockerDB.discardBlocker: convert str to Atom for DbapiProvidesIndex (bug 554578)
@ 2015-07-12 4:58 Zac Medico
2015-07-14 18:04 ` Brian Dolbec
0 siblings, 1 reply; 2+ messages in thread
From: Zac Medico @ 2015-07-12 4:58 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: Zac Medico
Since commit 11467fc640995e3dc8897c82bbc7130d5bf27d05, only Atom
instances are allowed to be passed into match_pkgs calls.
Fixes: 11467fc64099 ("depgraph: soname dependency resolution (bug 282639)")
X-Gentoo-Bug: 554578
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=554578
---
pym/_emerge/BlockerDB.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pym/_emerge/BlockerDB.py b/pym/_emerge/BlockerDB.py
index 8bb8f5f..44a70a0 100644
--- a/pym/_emerge/BlockerDB.py
+++ b/pym/_emerge/BlockerDB.py
@@ -1,4 +1,4 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import sys
@@ -7,6 +7,7 @@ import portage
from portage import os
from portage import digraph
from portage._sets.base import InternalPackageSet
+from portage.dep import Atom
from _emerge.BlockerCache import BlockerCache
from _emerge.Package import Package
@@ -117,7 +118,7 @@ class BlockerDB(object):
def discardBlocker(self, pkg):
"""Discard a package from the list of potential blockers.
This will match any package(s) with identical cpv or cp:slot."""
- for cpv_match in self._fake_vartree.dbapi.match_pkgs("=%s" % (pkg.cpv,)):
+ for cpv_match in self._fake_vartree.dbapi.match_pkgs(Atom("=%s" % (pkg.cpv,))):
if cpv_match.cp == pkg.cp:
self._fake_vartree.cpv_discard(cpv_match)
for slot_match in self._fake_vartree.dbapi.match_pkgs(pkg.slot_atom):
--
2.3.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [gentoo-portage-dev] [PATCH] BlockerDB.discardBlocker: convert str to Atom for DbapiProvidesIndex (bug 554578)
2015-07-12 4:58 [gentoo-portage-dev] [PATCH] BlockerDB.discardBlocker: convert str to Atom for DbapiProvidesIndex (bug 554578) Zac Medico
@ 2015-07-14 18:04 ` Brian Dolbec
0 siblings, 0 replies; 2+ messages in thread
From: Brian Dolbec @ 2015-07-14 18:04 UTC (permalink / raw
To: gentoo-portage-dev
On Sat, 11 Jul 2015 21:58:40 -0700
Zac Medico <zmedico@gentoo.org> wrote:
> Since commit 11467fc640995e3dc8897c82bbc7130d5bf27d05, only Atom
> instances are allowed to be passed into match_pkgs calls.
>
> Fixes: 11467fc64099 ("depgraph: soname dependency resolution (bug
> 282639)") X-Gentoo-Bug: 554578
> X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=554578
> ---
> pym/_emerge/BlockerDB.py | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/pym/_emerge/BlockerDB.py b/pym/_emerge/BlockerDB.py
> index 8bb8f5f..44a70a0 100644
> --- a/pym/_emerge/BlockerDB.py
> +++ b/pym/_emerge/BlockerDB.py
> @@ -1,4 +1,4 @@
> -# Copyright 1999-2012 Gentoo Foundation
> +# Copyright 1999-2015 Gentoo Foundation
> # Distributed under the terms of the GNU General Public License v2
>
> import sys
> @@ -7,6 +7,7 @@ import portage
> from portage import os
> from portage import digraph
> from portage._sets.base import InternalPackageSet
> +from portage.dep import Atom
>
> from _emerge.BlockerCache import BlockerCache
> from _emerge.Package import Package
> @@ -117,7 +118,7 @@ class BlockerDB(object):
> def discardBlocker(self, pkg):
> """Discard a package from the list of potential
> blockers. This will match any package(s) with identical cpv or
> cp:slot."""
> - for cpv_match in
> self._fake_vartree.dbapi.match_pkgs("=%s" % (pkg.cpv,)):
> + for cpv_match in
> self._fake_vartree.dbapi.match_pkgs(Atom("=%s" % (pkg.cpv,))): if
> cpv_match.cp == pkg.cp: self._fake_vartree.cpv_discard(cpv_match)
> for slot_match in
> self._fake_vartree.dbapi.match_pkgs(pkg.slot_atom):
LGTM
--
Brian Dolbec <dolsen>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-14 18:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-12 4:58 [gentoo-portage-dev] [PATCH] BlockerDB.discardBlocker: convert str to Atom for DbapiProvidesIndex (bug 554578) Zac Medico
2015-07-14 18:04 ` Brian Dolbec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox