In the absence of expertise: layman's fix for the following error:
authorFabian Groffen <grobian@gentoo.org>
Mon, 14 Apr 2008 18:04:12 +0000 (18:04 -0000)
committerFabian Groffen <grobian@gentoo.org>
Mon, 14 Apr 2008 18:04:12 +0000 (18:04 -0000)
  File "pym/portage/dbapi/vartree.py", line 1189, in unmerge
    plib_registry.unregister(self.mycpv, self.settings["SLOT"], self.settings["COUNTER"])
  File "pym/portage/dbapi/vartree.py", line 100, in unregister
    self.register(cpv, slot, counter, [])
  File "pym/portage/dbapi/vartree.py", line 86, in register
    and self._data[cps][0] == cpv and int(self._data[cps][1]) == int(counter):
ValueError: invalid literal for int() with base 10: ''

COUNTER appears to be empty quite often, in this case it is often and
called by some preserved-libs stuff.  I just replace counter with an
explicit 0 in case counter == "".

svn path=/main/branches/prefix/; revision=9894

pym/portage/dbapi/vartree.py

index 26946822494beac992ddd85e4b1d838e1a51e765..adf0c0a01c093f3d02233367a19e9b11339635b2 100644 (file)
@@ -82,6 +82,8 @@ class PreservedLibsRegistry(object):
                """
                cp = "/".join(catpkgsplit(cpv)[:2])
                cps = cp+":"+slot
+               if counter == "":
+                       counter = "0"
                if len(paths) == 0 and self._data.has_key(cps) \
                                and self._data[cps][0] == cpv and int(self._data[cps][1]) == int(counter):
                        del self._data[cps]