speed improvements:
- disabled database logging by default - cached linker paths in triggers git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@933 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
+10
-6
@@ -134,10 +134,11 @@ def postinstall(pkgdata):
|
||||
functions.add('createkernelsym')
|
||||
if x.startswith('/etc/env.d/'):
|
||||
functions.add('env_update')
|
||||
for path in ldpaths:
|
||||
if x.startswith(path) and (x.find(".so") != -1):
|
||||
if os.path.dirname(x) in ldpaths:
|
||||
if x.find(".so") > -1:
|
||||
functions.add('run_ldconfig')
|
||||
|
||||
|
||||
del ldpaths
|
||||
return functions
|
||||
|
||||
'''
|
||||
@@ -219,10 +220,11 @@ def postremove(pkgdata):
|
||||
functions.add('cleanpy')
|
||||
if x.startswith('/etc/env.d/'):
|
||||
functions.add('env_update')
|
||||
for path in ldpaths:
|
||||
if x.startswith(path) and (x.find(".so") != -1):
|
||||
if os.path.dirname(x) in ldpaths:
|
||||
if x.find(".so") > -1:
|
||||
functions.add('run_ldconfig')
|
||||
|
||||
|
||||
del ldpaths
|
||||
return functions
|
||||
|
||||
'''
|
||||
@@ -676,6 +678,8 @@ def run_ldconfig(pkgdata):
|
||||
os.system("ldconfig -r "+myroot+" &> /dev/null")
|
||||
|
||||
def env_update(pkgdata):
|
||||
# clear linker paths cache
|
||||
linkerPaths.clear()
|
||||
equoLog.log(ETP_LOGPRI_INFO,ETP_LOGLEVEL_NORMAL,"[POST] Running env-update")
|
||||
if os.access(etpConst['systemroot']+"/usr/sbin/env-update",os.X_OK):
|
||||
print_info(red(" ##")+brown(" Updating environment using env-update"))
|
||||
|
||||
+202
-203
File diff suppressed because it is too large
Load Diff
@@ -402,6 +402,7 @@ compareVersionsCache = {}
|
||||
getNewerVersionCache = {}
|
||||
# generateDependencyTree match filter
|
||||
matchFilter = set()
|
||||
linkerPaths = set()
|
||||
|
||||
### Application disk cache
|
||||
def const_resetCache():
|
||||
@@ -427,6 +428,7 @@ def const_resetCache():
|
||||
compareVersionsCache.clear()
|
||||
getNewerVersionCache.clear()
|
||||
matchFilter.clear()
|
||||
linkerPaths.clear()
|
||||
|
||||
# Inside it you'll find instantiated vartree classes
|
||||
portageRoots = {}
|
||||
|
||||
@@ -2074,6 +2074,8 @@ def extractPkgData(package, etpBranch = etpConst['branch'], silent = False, inje
|
||||
return data
|
||||
|
||||
def collectLinkerPaths():
|
||||
if linkerPaths:
|
||||
return linkerPaths
|
||||
ldpaths = set()
|
||||
try:
|
||||
f = open(etpConst['systemroot']+"/etc/ld.so.conf","r")
|
||||
@@ -2085,6 +2087,8 @@ def collectLinkerPaths():
|
||||
f.close()
|
||||
except:
|
||||
pass
|
||||
linkerPaths.clear()
|
||||
linkerPaths.update(ldpaths)
|
||||
return ldpaths
|
||||
|
||||
def string_to_utf8(string):
|
||||
|
||||
Reference in New Issue
Block a user