* [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/, pym/portage/emaint/modules/move/, pym/_emerge/
@ 2012-11-14 17:16 Zac Medico
0 siblings, 0 replies; only message in thread
From: Zac Medico @ 2012-11-14 17:16 UTC (permalink / raw
To: gentoo-commits
commit: 43fff141bc6d8db63b6ec6d21b085f09a7c0d12e
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 14 17:16:10 2012 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Nov 14 17:16:10 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=43fff141
Pass settings to _pkg_str constructor.
Forgotten in commit 0b4e6c27e87e57fac09fa28d3ed1320cb6a83ad9.
---
pym/_emerge/FakeVartree.py | 2 +-
pym/portage/dbapi/__init__.py | 7 +++++--
pym/portage/emaint/modules/move/move.py | 8 ++++++--
3 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/pym/_emerge/FakeVartree.py b/pym/_emerge/FakeVartree.py
index 9babb4c..17c95ac 100644
--- a/pym/_emerge/FakeVartree.py
+++ b/pym/_emerge/FakeVartree.py
@@ -290,7 +290,7 @@ def perform_global_updates(mycpv, mydb, myupdates):
aux_keys = Package._dep_keys + mydb._pkg_str_aux_keys
aux_dict = dict(zip(aux_keys, mydb.aux_get(mycpv, aux_keys)))
try:
- pkg = _pkg_str(mycpv, metadata=aux_dict)
+ pkg = _pkg_str(mycpv, metadata=aux_dict, settings=mydb.settings)
except InvalidData:
return
aux_dict = dict((k, aux_dict[k]) for k in Package._dep_keys)
diff --git a/pym/portage/dbapi/__init__.py b/pym/portage/dbapi/__init__.py
index c6bdbc7..49b7293 100644
--- a/pym/portage/dbapi/__init__.py
+++ b/pym/portage/dbapi/__init__.py
@@ -301,9 +301,12 @@ class dbapi(object):
if onProgress:
onProgress(maxval, 0)
for i, cpv in enumerate(cpv_all):
- metadata = dict(zip(meta_keys, aux_get(cpv, meta_keys)))
try:
- pkg = _pkg_str(cpv, metadata=metadata)
+ metadata = dict(zip(meta_keys, aux_get(cpv, meta_keys)))
+ except KeyError:
+ continue
+ try:
+ pkg = _pkg_str(cpv, metadata=metadata, settings=self.settings)
except InvalidData:
continue
metadata = dict((k, metadata[k]) for k in update_keys)
diff --git a/pym/portage/emaint/modules/move/move.py b/pym/portage/emaint/modules/move/move.py
index 607fbc4..ef674d4 100644
--- a/pym/portage/emaint/modules/move/move.py
+++ b/pym/portage/emaint/modules/move/move.py
@@ -51,6 +51,7 @@ class MoveHandler(object):
match = self._tree.dbapi.match
aux_get = self._tree.dbapi.aux_get
pkg_str = self._tree.dbapi._pkg_str
+ settings = self._tree.dbapi.settings
if onProgress:
onProgress(0, 0)
for repo, updates in allupdates.items():
@@ -97,9 +98,12 @@ class MoveHandler(object):
if onProgress:
onProgress(maxval, 0)
for i, cpv in enumerate(cpv_all):
- metadata = dict(zip(meta_keys, aux_get(cpv, meta_keys)))
try:
- pkg = _pkg_str(cpv, metadata=metadata)
+ metadata = dict(zip(meta_keys, aux_get(cpv, meta_keys)))
+ except KeyError:
+ continue
+ try:
+ pkg = _pkg_str(cpv, metadata=metadata, settings=settings)
except InvalidData:
continue
metadata = dict((k, metadata[k]) for k in self._update_keys)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-11-14 17:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-14 17:16 [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/, pym/portage/emaint/modules/move/, pym/_emerge/ Zac Medico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox