diff --git a/client/text_ui.py b/client/text_ui.py index f4d6d6e51..4e7be1a47 100644 --- a/client/text_ui.py +++ b/client/text_ui.py @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- ''' Copyright (C) 2007-2009 Fabio Erculiani @@ -30,6 +31,7 @@ from entropy.client.interfaces import Client from entropy.misc import ParallelTask from entropy.i18n import _ Equo = Client() +DIRS_TO_CLEAN = set() def package(options): @@ -723,14 +725,15 @@ def installPackages(packages = None, atomsdata = None, deps = True, print_warning(mytxt) etpUi['pretend'] = True - etpSys['dirstoclean'].clear() + DIRS_TO_CLEAN.clear() def dirscleanup(): - for x in etpSys['dirstoclean']: + for xdir in DIRS_TO_CLEAN: try: - if os.path.isdir(x): shutil.rmtree(x) - except: - pass - etpSys['dirstoclean'].clear() + if os.path.isdir(xdir): + shutil.rmtree(xdir, True) + except shutil.Error: + continue + DIRS_TO_CLEAN.clear() explicit_user_packages = set() diff --git a/docs/TODO b/docs/TODO index 4fe68ebc3..3435abb06 100644 --- a/docs/TODO +++ b/docs/TODO @@ -4,7 +4,6 @@ Proposed for Entropy 1.0 (before and after) (requires API changes, perhaps): 1.0_beta1: - - ditch etpSys['dirstoclean'] - reagent update selective add/remove - entropy.tools + entropy.transceivers API docs merge - entropy.client.interfaces.trigger, move Portage code to entropy.spm diff --git a/libraries/entropy/client/interfaces/methods.py b/libraries/entropy/client/interfaces/methods.py index 38b0c8f45..92626d73f 100644 --- a/libraries/entropy/client/interfaces/methods.py +++ b/libraries/entropy/client/interfaces/methods.py @@ -411,7 +411,6 @@ class RepositoryMixin: dbpath = db_dir+"/packages.db") if dbfile == None: return -1, atoms_contained - etpSys['dirstoclean'].add(os.path.dirname(dbfile)) # add dbfile repodata = {} repodata['repoid'] = basefile diff --git a/libraries/entropy/const.py b/libraries/entropy/const.py index cdcd46730..69f0c10c1 100644 --- a/libraries/entropy/const.py +++ b/libraries/entropy/const.py @@ -59,15 +59,14 @@ for arches, arch in ETP_ARCH_MAP.items(): ETP_ARCH_CONST = arch etpSys = { - 'archs': ["x86", "amd64"], - 'keywords': set([ETP_ARCH_CONST,"~"+ETP_ARCH_CONST]), + 'archs': ['alpha', 'amd64', 'amd64-fbsd', 'arm', 'hppa', 'ia64', 'm68k', + 'mips', 'ppc', 'ppc64', 's390', 'sh', 'sparc', 'sparc-fbsd', 'x86', + 'x86-fbsd'], + 'keywords': set([ETP_ARCH_CONST, "~"+ETP_ARCH_CONST]), 'api': '3', 'arch': ETP_ARCH_CONST, 'rootdir': "", - 'maxthreads': 100, - 'dirstoclean': set(), 'serverside': False, - 'killpids': set(), } etpUi = {