diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-06-22 02:59:53 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-06-22 02:59:53 -0700 |
commit | e4ba8f36e6a4624f4fec61c7ce8bed0e3bd2fa01 (patch) | |
tree | bc90757f7887bf571d98617d1178ff2be3c90ff1 /pym/portage/dbapi | |
parent | fakedbapi: use _pkg_str more (diff) | |
download | portage-e4ba8f36e6a4624f4fec61c7ce8bed0e3bd2fa01.tar.gz portage-e4ba8f36e6a4624f4fec61c7ce8bed0e3bd2fa01.tar.bz2 portage-e4ba8f36e6a4624f4fec61c7ce8bed0e3bd2fa01.zip |
Add experimental EAPI 4-slot-abi support.
Refer to 4-slot-abi.docbook for a full description.
Diffstat (limited to 'pym/portage/dbapi')
-rw-r--r-- | pym/portage/dbapi/__init__.py | 4 | ||||
-rw-r--r-- | pym/portage/dbapi/porttree.py | 4 | ||||
-rw-r--r-- | pym/portage/dbapi/vartree.py | 5 |
3 files changed, 9 insertions, 4 deletions
diff --git a/pym/portage/dbapi/__init__.py b/pym/portage/dbapi/__init__.py index 2ab7dc5b6..34b1d4705 100644 --- a/pym/portage/dbapi/__init__.py +++ b/pym/portage/dbapi/__init__.py @@ -8,7 +8,7 @@ import re import portage portage.proxy.lazyimport.lazyimport(globals(), 'portage.dbapi.dep_expand:dep_expand@_dep_expand', - 'portage.dep:match_from_list', + 'portage.dep:match_from_list,_match_slot', 'portage.output:colorize', 'portage.util:cmp_sort_key,writemsg', 'portage.versions:catsplit,catpkgsplit,vercmp,_pkg_str', @@ -173,7 +173,7 @@ class dbapi(object): except (KeyError, InvalidData): pass else: - if pkg_str.slot == atom.slot: + if _match_slot(atom, pkg_str): yield pkg_str def _iter_match_use(self, atom, cpv_iter): diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index df681152c..945c22c3d 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -10,7 +10,7 @@ portage.proxy.lazyimport.lazyimport(globals(), 'portage.checksum', 'portage.data:portage_gid,secpass', 'portage.dbapi.dep_expand:dep_expand', - 'portage.dep:Atom,dep_getkey,match_from_list,use_reduce', + 'portage.dep:Atom,dep_getkey,match_from_list,use_reduce,_match_slot', 'portage.package.ebuild.doebuild:doebuild', 'portage.util:ensure_dirs,shlex_split,writemsg,writemsg_level', 'portage.util.listdir:listdir', @@ -836,7 +836,7 @@ class portdbapi(dbapi): continue if mydep.slot is not None and \ - mydep.slot != pkg_str.slot: + not _match_slot(mydep, pkg_str): continue if mydep.unevaluated_atom.use is not None and \ diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 5448bd431..b8405d483 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -3465,6 +3465,11 @@ class dblink(object): if not os.path.exists(self.dbcatdir): ensure_dirs(self.dbcatdir) + try: + slot = self.mycpv.slot + except AttributeError: + # discard the sub-slot if necesssary + slot = _pkg_str(self.mycpv, slot=slot).slot cp = self.mysplit[0] slot_atom = "%s:%s" % (cp, slot) |