From 7cd5228b3afbc145668a317ebb23f7b856a7c5b2 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Wed, 27 Nov 2013 17:27:39 +0100 Subject: [PATCH] [solo.commands.preservedlibs] inform user about libraries owned by packages in gc --- client/solo/commands/preservedlibs.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/client/solo/commands/preservedlibs.py b/client/solo/commands/preservedlibs.py index c5885ee8c..fd883e478 100644 --- a/client/solo/commands/preservedlibs.py +++ b/client/solo/commands/preservedlibs.py @@ -184,6 +184,9 @@ Tools to manage the preserved libraries currently stored on the system. return 0 for library, elfclass, path in collectables: + + package_ids = inst_repo.isFileAvailable(path, get_id = True) + entropy_client.output( "%s [%s:%s]" % ( darkred(path), @@ -191,6 +194,21 @@ Tools to manage the preserved libraries currently stored on the system. teal(const_convert_to_unicode(elfclass)), )) + for package_id in package_ids: + atom = inst_repo.retrieveAtom(package_id) + if atom is None: + continue + + entropy_client.output( + "%s: %s, %s" % ( + blue(_("but owned by")), + darkgreen(atom), + blue(_("then just unregister the library")), + ), + header=brown(" -> "), + importance=0 + ) + return 0