Entropy/*:

- make use of the new entropy package structure


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@3123 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
lxnay
2009-03-08 15:49:55 +00:00
parent 1b0435dda9
commit 83e184fc5e
17 changed files with 52 additions and 66 deletions
+5 -5
View File
@@ -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:
+2 -2
View File
@@ -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":
+3 -3
View File
@@ -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 _
########################################################
+2 -2
View File
@@ -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 _
########################################################
+4 -2
View File
@@ -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):
+5 -8
View File
@@ -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,) ))
+3 -3
View File
@@ -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):
+3 -3
View File
@@ -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
+4 -8
View File
@@ -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):
@@ -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):
+4 -4
View File
@@ -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)
-10
View File
@@ -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()
+2 -2
View File
@@ -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):
+2 -2
View File
@@ -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":
+2 -2
View File
@@ -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):
+5 -8
View File
@@ -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,
+2 -1
View File
@@ -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 _
'''