From 7a86df8a96f5fa82e15ab90a335f11577093fb88 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Mon, 14 Apr 2008 18:04:12 +0000 Subject: [PATCH] In the absence of expertise: layman's fix for the following error: 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 269468224..adf0c0a01 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -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] -- 2.26.2