diff --git a/client/equo.py b/client/equo.py index 1231e6f7d..e10c9e99c 100644 --- a/client/equo.py +++ b/client/equo.py @@ -3,7 +3,7 @@ # DESCRIPTION: # Entropy Package Manager client - Copyright (C) 2007-2008 Fabio Erculiani + Copyright (C) 2007-2009 Fabio Erculiani This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -402,16 +402,16 @@ def writeerrorstatus(status): def reset_cache(): try: - from entropy import EquoInterface - Equo = EquoInterface(noclientdb = 2) + from entropy.client.interfaces import Client + Equo = Client(noclientdb = 2) Equo.purge_cache() Equo.destroy() except: pass def load_conf_cache(): - from entropy import EquoInterface - Equo = EquoInterface(noclientdb = 2) + from entropy.client.interfaces import Client + Equo = Client(noclientdb = 2) if not etpUi['quiet']: print_info(red(" @@ ")+blue(_("Caching equo conf")), back = True) try: while 1: diff --git a/client/text_cache.py b/client/text_cache.py index 255ebf86e..1f18fc88c 100644 --- a/client/text_cache.py +++ b/client/text_cache.py @@ -20,13 +20,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ''' -from entropy import EquoInterface +from entropy.client.interfaces import Client def cache(options): rc = 0 if len(options) < 1: return -10 - Equo = EquoInterface(noclientdb = True) + Equo = Client(noclientdb = True) if options[0] == "clean": Equo.purge_cache() elif options[0] == "generate": diff --git a/client/text_configuration.py b/client/text_configuration.py index 165b0ea44..75c6429d8 100644 --- a/client/text_configuration.py +++ b/client/text_configuration.py @@ -4,7 +4,7 @@ # DESCRIPTION: # Packages configuration files handling function (etc-update alike) - Copyright (C) 2007-2008 Fabio Erculiani + Copyright (C) 2007-2009 Fabio Erculiani This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,8 +25,8 @@ import shutil import commands from entropyConstants import * from outputTools import * -from entropy import EquoInterface -Equo = EquoInterface() # client db must be available, it is for a reason! +from entropy.client.interfaces import Client +Equo = Client() # client db must be available, it is for a reason! from entropy.i18n import _ ######################################################## diff --git a/client/text_query.py b/client/text_query.py index efbe8dd0f..d17548ed8 100644 --- a/client/text_query.py +++ b/client/text_query.py @@ -3,7 +3,7 @@ # DESCRIPTION: # Entropy database query tools and library - Copyright (C) 2007-2008 Fabio Erculiani + Copyright (C) 2007-2009 Fabio Erculiani This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,7 +22,7 @@ from entropyConstants import * from outputTools import * -from entropy import EquoInterface +from entropy.client.interfaces import Client as EquoInterface from entropy.i18n import _ ######################################################## diff --git a/client/text_repositories.py b/client/text_repositories.py index 0a9fcf243..ede208ac4 100644 --- a/client/text_repositories.py +++ b/client/text_repositories.py @@ -31,8 +31,10 @@ try: from entropy.exceptions import * except ImportError: from exceptionTools import * -from entropy import EquoInterface, rssFeed -Equo = EquoInterface(noclientdb = True) + +from entropy.client.interfaces import Client +from entropy.misc import rssFeed +Equo = Client(noclientdb = True) from entropy.i18n import _ def repositories(options): diff --git a/client/text_rescue.py b/client/text_rescue.py index 89f30238b..69e451798 100644 --- a/client/text_rescue.py +++ b/client/text_rescue.py @@ -3,7 +3,7 @@ # DESCRIPTION: # Equo integrity handling library - Copyright (C) 2007-2008 Fabio Erculiani + Copyright (C) 2007-2009 Fabio Erculiani This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -27,12 +27,9 @@ from entropyConstants import * from outputTools import * -from entropy import EquoInterface -try: - from entropy.exceptions import * -except ImportError: - from exceptionTools import * -Equo = EquoInterface(noclientdb = True) +from entropy.client.interfaces import Client +from entropy.exceptions import * +Equo = Client(noclientdb = True) from entropy.i18n import _ def test_spm(): @@ -695,7 +692,7 @@ def pythonUpdater(): if len(mydirs) <= 1: print_info(brown(" @@ ")+blue(_("Your Python installation seems fine."))) return 0 - mydirs.sort() + mydirs = sorted(mydirs) print_info(brown(" @@ ")+blue(_("Multiple Python directories found:"))) for pdir in mydirs: print_info(red(" # ")+blue("/usr/lib/%s" % (pdir,) )) diff --git a/client/text_security.py b/client/text_security.py index 2360a3eed..954709cb0 100644 --- a/client/text_security.py +++ b/client/text_security.py @@ -3,7 +3,7 @@ # DESCRIPTION: # Equo security tools - Copyright (C) 2007-2008 Fabio Erculiani + Copyright (C) 2007-2009 Fabio Erculiani This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,8 +21,8 @@ ''' from entropyConstants import * from outputTools import * -from entropy import EquoInterface -Equo = EquoInterface() +from entropy.client.interfaces import Client +Equo = Client() from entropy.i18n import _ def security(options): diff --git a/client/text_ugc.py b/client/text_ugc.py index 1f0a47e4a..f1cf00e85 100644 --- a/client/text_ugc.py +++ b/client/text_ugc.py @@ -1,6 +1,6 @@ #!/usr/bin/python ''' - Copyright (C) 2007-2008 Fabio Erculiani + Copyright (C) 2007-2009 Fabio Erculiani This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,9 +19,9 @@ from entropyConstants import * from outputTools import * -from entropy import EquoInterface +from entropy.client.interfaces import Client from entropy.i18n import _ -Equo = EquoInterface() +Equo = Client() Equo.UGC.show_progress = True diff --git a/client/text_ui.py b/client/text_ui.py index e089d851e..443dfb61d 100644 --- a/client/text_ui.py +++ b/client/text_ui.py @@ -1,6 +1,6 @@ #!/usr/bin/python ''' - Copyright (C) 2007-2008 Fabio Erculiani + Copyright (C) 2007-2009 Fabio Erculiani This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,15 +22,11 @@ ## Packages user handling function # -try: - from entropy.exceptions import * -except ImportError: - from exceptionTools import * - +from entropy.exceptions import * from entropyConstants import * from outputTools import * -from entropy import EquoInterface -Equo = EquoInterface() +from entropy.client.interfaces import Client +Equo = Client() from entropy.i18n import _ def package(options): diff --git a/entropy-notification-applet/src/etp_applet.py b/entropy-notification-applet/src/etp_applet.py index 27488117b..f000659da 100644 --- a/entropy-notification-applet/src/etp_applet.py +++ b/entropy-notification-applet/src/etp_applet.py @@ -37,7 +37,10 @@ try: except ImportError: from exceptionTools import * import entropyTools -from entropy import EquoInterface, RepoInterface, urlFetcher +from entropy.client.interfaces import Client as EquoInterface +from entropy.client.interfaces import Repository as RepoInterface +from entropy.transceivers import urlFetcher + from entropy.i18n import _ class Entropy(EquoInterface): diff --git a/libraries/entropyTools.py b/libraries/entropyTools.py index 0c8b4899e..e4c009886 100644 --- a/libraries/entropyTools.py +++ b/libraries/entropyTools.py @@ -2445,10 +2445,10 @@ def isEntropyTbz2(tbz2file): def appendXpak(tbz2file, atom): import etpXpak - from entropy import SpmInterface - SpmIntf = SpmInterface(None) - Spm = SpmIntf.intf - dbdir = Spm.get_vdb_path()+"/"+atom+"/" + from entropy.spm import Spm + SpmIntf = Spm(None) + spm = SpmIntf.intf + dbdir = spm.get_vdb_path()+"/"+atom+"/" if os.path.isdir(dbdir): tbz2 = etpXpak.tbz2(tbz2file) tbz2.recompose(dbdir) diff --git a/libraries/ut/urlFetcher.py b/libraries/ut/urlFetcher.py deleted file mode 100644 index 0adf8e967..000000000 --- a/libraries/ut/urlFetcher.py +++ /dev/null @@ -1,10 +0,0 @@ -import sys -sys.path.insert(0,'../') -from entropy import urlFetcher - -# test 1 -url = "http://svn.sabayonlinux.org/entropy/standard/sabayonlinux.org/database/amd64/4/packages.db.bz2" -to = "/tmp/packages.db.bz2" -u = urlFetcher(url, to) -print u.download() - diff --git a/server/server_activator.py b/server/server_activator.py index 8b527b73a..57d81566a 100644 --- a/server/server_activator.py +++ b/server/server_activator.py @@ -22,9 +22,9 @@ from entropyConstants import * from outputTools import * -from entropy import ServerInterface +from entropy.server.interfaces import Server from entropy.i18n import _ -Entropy = ServerInterface(community_repo = etpConst['community']['mode']) +Entropy = Server(community_repo = etpConst['community']['mode']) def sync(options, justTidy = False): diff --git a/server/server_query.py b/server/server_query.py index 25aed52fc..537b8569f 100644 --- a/server/server_query.py +++ b/server/server_query.py @@ -23,7 +23,7 @@ from outputTools import * from entropyConstants import * import text_query -from entropy import ServerInterface +from entropy.server.interfaces import Server from entropy.i18n import _ def query(myopts): @@ -36,7 +36,7 @@ def query(myopts): return 10 rc = 0 - Entropy = ServerInterface() + Entropy = Server() dbconn = Entropy.openServerDatabase(just_reading = True) if cmd == "search": diff --git a/server/server_reagent.py b/server/server_reagent.py index 53241e9a8..f45aa0a8a 100644 --- a/server/server_reagent.py +++ b/server/server_reagent.py @@ -22,9 +22,9 @@ from entropyConstants import * from outputTools import * -from entropy import ServerInterface +from entropy.server.interfaces import Server from entropy.i18n import _ -Entropy = ServerInterface(community_repo = etpConst['community']['mode']) +Entropy = Server(community_repo = etpConst['community']['mode']) def inject(options): diff --git a/spritz/src/dialogs.py b/spritz/src/dialogs.py index 2ba44019a..046dbe2b1 100644 --- a/spritz/src/dialogs.py +++ b/spritz/src/dialogs.py @@ -24,10 +24,7 @@ from etpgui import CURRENT_CURSOR, busyCursor, normalCursor from spritz_setup import const, cleanMarkupString, SpritzConf, unicode2htmlentities, fakeoutfile, fakeinfile from entropy.i18n import _,_LOCALE import packages -try: - from entropy.exceptions import * -except ImportError: - from exceptionTools import * +from entropy.exceptions import * from entropyConstants import * @@ -62,7 +59,7 @@ class NoticeBoardWindow(MenuSkel): def __init__( self, window, entropy ): - from entropy import rssFeed + from entropy.misc import rssFeed self.rssFeed = rssFeed self.Entropy = entropy self.window = window @@ -422,9 +419,9 @@ class RepositoryManagerMenu(MenuSkel): self.data_tree_selection_mode = None self.DataViewVbox = self.sm_ui.dataViewVbox - from entropy import SystemManagerClientInterface, \ - SystemManagerRepositoryClientCommands, \ - SystemManagerRepositoryMethodsInterface + from entropy.client.services.system.interfaces import Client as SystemManagerClientInterface + from entropy.client.services.system.commands import Repository as SystemManagerRepositoryClientCommands + from entropy.client.services.system.methods import Repository as SystemManagerRepositoryMethodsInterface self.Service = SystemManagerClientInterface( self.Entropy, MethodsInterface = SystemManagerRepositoryMethodsInterface, diff --git a/spritz/src/entropyapi.py b/spritz/src/entropyapi.py index cc2842be6..f06a3f164 100644 --- a/spritz/src/entropyapi.py +++ b/spritz/src/entropyapi.py @@ -24,7 +24,8 @@ from dialogs import questionDialog, LicenseDialog, okDialog, choiceDialog, input # Entropy Imports from entropyConstants import * -from entropy import EquoInterface, urlFetcher +from entropy.client.interfaces import Client as EquoInterface +from entropy.transceivers import urlFetcher from entropy.i18n import _ '''