[entropy.const] etpSys cleanup, ditched unused keywords and dirstoclean

This commit is contained in:
Fabio Erculiani
2009-09-16 17:52:42 +02:00
parent 9edd021660
commit f01efbf124
4 changed files with 13 additions and 13 deletions

View File

@@ -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()

View File

@@ -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

View File

@@ -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

View File

@@ -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 = {