commit:     bdc75b3aa217649f6d835b04eb3cac879459c0a0
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 17 08:47:13 2021 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Jan 17 08:47:26 2021 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=bdc75b3a

bindbapi.move_ent: remove redundant self._pkg_str calls

Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/portage/dbapi/bintree.py | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/lib/portage/dbapi/bintree.py b/lib/portage/dbapi/bintree.py
index 7e24589e5..528a68979 100644
--- a/lib/portage/dbapi/bintree.py
+++ b/lib/portage/dbapi/bintree.py
@@ -1,4 +1,4 @@
-# Copyright 1998-2020 Gentoo Authors
+# Copyright 1998-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 __all__ = ["bindbapi", "binarytree"]
@@ -27,7 +27,7 @@ from portage.cache.mappings import slot_dict_class
 from portage.const import BINREPOS_CONF_FILE, CACHE_PATH, 
SUPPORTED_XPAK_EXTENSIONS
 from portage.dbapi.virtual import fakedbapi
 from portage.dep import Atom, use_reduce, paren_enclose
-from portage.exception import AlarmSignal, InvalidData, InvalidPackageName, \
+from portage.exception import AlarmSignal, InvalidPackageName, \
        ParseError, PortageException
 from portage.localization import _
 from portage.package.ebuild.profile_iuse import iter_iuse_vars
@@ -466,11 +466,7 @@ class binarytree:
                if not origmatches:
                        return moves
                for mycpv in origmatches:
-                       try:
-                               mycpv = self.dbapi._pkg_str(mycpv, None)
-                       except (KeyError, InvalidData):
-                               continue
-                       mycpv_cp = portage.cpv_getkey(mycpv)
+                       mycpv_cp = mycpv.cp
                        if mycpv_cp != origcp:
                                # Ignore PROVIDE virtual match.
                                continue

Reply via email to