treewalk: fix USE=multislot breakage
authorZac Medico <zmedico@gentoo.org>
Sat, 23 Jun 2012 01:13:56 +0000 (18:13 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 23 Jun 2012 01:13:56 +0000 (18:13 -0700)
It broke in commit e4ba8f36e6a4624f4fec61c7ce8bed0e3bd2fa01.

pym/portage/dbapi/vartree.py

index 60bab73bac7359635ac24742ecc22bed947f1109..e2b1b9bb270884a6e9c1b742247ce2521238ebf0 100644 (file)
@@ -3467,11 +3467,10 @@ 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
+               # NOTE: We use SLOT obtained from the inforoot
+               #       directory, in order to support USE=multislot.
+               # Use _pkg_str discard the sub-slot part if necessary.
+               slot = _pkg_str(self.mycpv, slot=slot).slot
                cp = self.mysplit[0]
                slot_atom = "%s:%s" % (cp, slot)