summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-03-12 05:54:45 +0000
committerZac Medico <zmedico@gentoo.org>2009-03-12 05:54:45 +0000
commit07b38d6ad91816d4b9418129016973a5133d7988 (patch)
treebf1046ea7b1bc096b87e393fb50180dae6153a72 /pym
parent8626fa2c615240960e2bc3f78169fae87addf66e (diff)
downloadportage-07b38d6ad91816d4b9418129016973a5133d7988.tar.gz
portage-07b38d6ad91816d4b9418129016973a5133d7988.tar.bz2
portage-07b38d6ad91816d4b9418129016973a5133d7988.zip
Bug #262211 - Make vardbapi.aux_get() translate empty SLOT to 0 since other
code expects non-empty SLOT (for generation package slot atoms). (trunk r13060) svn path=/main/branches/2.1.6/; revision=13074
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/dbapi/vartree.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 43091d4ea..399aa2791 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -518,6 +518,10 @@ class vardbapi(dbapi):
cache_data[aux_key] = mydata[aux_key]
self._aux_cache["packages"][mycpv] = (mydir_mtime, cache_data)
self._aux_cache["modified"].add(mycpv)
+ if not mydata['SLOT']:
+ # Empty slot triggers InvalidAtom exceptions when generating slot
+ # atoms for packages, so translate it to '0' here.
+ mydata['SLOT'] = '0'
return [mydata[x] for x in wants]
def _aux_get(self, mycpv, wants, st=None):