From dcc252947317c558883ed28581d0731f095b1b91 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 14 Dec 2008 20:50:37 +0000 Subject: [PATCH] Bug #250902 - Inside dblink._find_unused_preserved_libs(), show a warning instead of raising a KeyError if the preserved libs registry contains a symlink that points to a lib which is not preserved. svn path=/main/trunk/; revision=12252 --- pym/portage/dbapi/vartree.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index d992a3292..8b0fb5f4b 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -2734,7 +2734,14 @@ class dblink(object): unlink_list.update(node.alt_paths) unlink_list = sorted(unlink_list) for obj in unlink_list: - cpv = path_cpv_map[obj] + cpv = path_cpv_map.get(obj) + if cpv is None: + # This means that a symlink is in the preserved libs + # registry, but the actual lib it points to is not. + self._display_merge("!!! symlink to lib is preserved, " + \ + "but not the lib itself:\n!!! '%s'\n" % (obj,), + level=logging.ERROR, noiselevel=-1) + continue removed = cpv_lib_map.get(cpv) if removed is None: removed = set() -- 2.26.2