Equo/text_rescue:

- when resurrecting db, verify that atom from clientdb has been retrieved correctly


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2580 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
lxnay
2008-10-28 11:29:18 +00:00
parent c57e70f332
commit 2a7d1d6d4e

View File

@@ -456,22 +456,25 @@ def database(options):
if x[0] not in installedCounters:
# check if the package is in toBeAdded
if (toBeAdded):
atomkey = Equo.entropyTools.dep_getkey(Equo.clientDbconn.retrieveAtom(x[1]))
atomslot = Equo.clientDbconn.retrieveSlot(x[1])
atom = Equo.clientDbconn.retrieveAtom(x[1])
add = True
for pkgdata in toBeAdded:
try:
addslot = Spm.get_installed_package_slot(pkgdata[0])
except KeyError:
continue
addkey = Equo.entropyTools.dep_getkey(pkgdata[0])
# workaround for ebuilds not having slot
if addslot == None:
addslot = '0'
if (atomkey == addkey) and (str(atomslot) == str(addslot)):
# do not add to toBeRemoved
add = False
break
if atom:
atomkey = Equo.entropyTools.dep_getkey(atom)
atomslot = Equo.clientDbconn.retrieveSlot(x[1])
add = True
for pkgdata in toBeAdded:
try:
addslot = Spm.get_installed_package_slot(pkgdata[0])
except KeyError:
continue
addkey = Equo.entropyTools.dep_getkey(pkgdata[0])
# workaround for ebuilds not having slot
if addslot == None:
addslot = '0'
if (atomkey == addkey) and (str(atomslot) == str(addslot)):
# do not add to toBeRemoved
add = False
break
if add:
toBeRemoved.add(x[1])
else: