From 78bb31fed8e9c2b8be7ae22330ee98965f263d7f Mon Sep 17 00:00:00 2001 From: lxnay Date: Tue, 13 Jan 2009 10:47:13 +0000 Subject: [PATCH] Entropy/Equo: - do not use text_configuration module but load EquoInterface instead when caching on exit - small syntax updates git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2891 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- client/equo.py | 10 +++++----- client/text_ui.py | 5 ++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/client/equo.py b/client/equo.py index fd1d2c026..16958d94b 100644 --- a/client/equo.py +++ b/client/equo.py @@ -389,23 +389,22 @@ def reset_cache(): pass def load_conf_cache(): - try: - import text_configuration - except exceptionTools.FileNotFound: - return + from entropy import EquoInterface + Equo = EquoInterface(noclientdb = 2) if not etpUi['quiet']: print_info(red(" @@ ")+blue(_("Caching equo conf")), back = True) try: oldquiet = etpUi['quiet'] etpUi['quiet'] = True while 1: try: - scandata = text_configuration.Equo.FileUpdates.scanfs(dcache = True) + scandata = Equo.FileUpdates.scanfs(dcache = True) break except KeyboardInterrupt: continue etpUi['quiet'] = oldquiet except: if not etpUi['quiet']: print_info(red(" @@ ")+blue(_("Caching not run."))) + Equo.destroy() return if not etpUi['quiet']: print_info(red(" @@ ")+blue(_("Caching complete."))) if scandata: # can be None @@ -419,6 +418,7 @@ def load_conf_cache(): print_warning(darkgreen(mytxt)) mytxt = "%s: %s" % (red(_("Please run")),bold("equo conf update")) print_warning(mytxt) + Equo.destroy() try: rc = 0 diff --git a/client/text_ui.py b/client/text_ui.py index 51840647f..11171f19a 100644 --- a/client/text_ui.py +++ b/client/text_ui.py @@ -252,9 +252,8 @@ def worldUpdate(onlyfetch = False, replay = False, upgradeTo = None, resume = Fa # verify that client database idpackage still exist, validate here before passing removePackage() wrong info remove = [x for x in remove if Equo.clientDbconn.isIDPackageAvailable(x)] - if (remove): - remove = list(remove) - remove.sort() + if remove: + remove = sorted(remove) print_info(red(" @@ ") + \ blue("%s." % ( _("On the system there are packages that are not available anymore in the online repositories"),