diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-12-14 20:50:37 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-12-14 20:50:37 +0000 |
commit | dcc252947317c558883ed28581d0731f095b1b91 (patch) | |
tree | 94d7a91f22a1a1493338bcdcdc14fd790f4e65e7 | |
parent | 11cdf03af901801600ca50edcbe4de5eb6bbc560 (diff) | |
download | portage-dcc252947317c558883ed28581d0731f095b1b91.tar.gz portage-dcc252947317c558883ed28581d0731f095b1b91.tar.bz2 portage-dcc252947317c558883ed28581d0731f095b1b91.zip |
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
-rw-r--r-- | pym/portage/dbapi/vartree.py | 9 |
1 files changed, 8 insertions, 1 deletions
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() |