* ./goodies:
- Change: In buildCoriolis.py, now manage correctly any combination of projects/tools/standalone tools. Standalones tools are always processeds last.
This commit is contained in:
parent
8fc0656949
commit
84f582f2ef
|
@ -36,12 +36,12 @@ class Project:
|
||||||
def activate ( self, tools ):
|
def activate ( self, tools ):
|
||||||
# Build the ordered list.
|
# Build the ordered list.
|
||||||
for tool in self._tools:
|
for tool in self._tools:
|
||||||
if tool in tools:
|
if (tool in tools) and not (tool in self._actives):
|
||||||
self._actives += [ tool ]
|
self._actives += [ tool ]
|
||||||
# Find the tools not part of the project.
|
# Find the tools not part of the project.
|
||||||
rejecteds = []
|
rejecteds = []
|
||||||
for tool in tools:
|
for tool in tools:
|
||||||
if not (tool in self._tools):
|
if not (tool in self._tools) and (not tool in rejecteds):
|
||||||
rejecteds += [ tool ]
|
rejecteds += [ tool ]
|
||||||
return rejecteds
|
return rejecteds
|
||||||
|
|
||||||
|
@ -108,21 +108,6 @@ class ProjectBuilder:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
def _orderTools ( self, tools ):
|
|
||||||
if tools:
|
|
||||||
# Checks if the requested tools are in the various projects.
|
|
||||||
self._standalones = tools
|
|
||||||
for project in self._projects:
|
|
||||||
self._standalones = project.activate ( self._standalones )
|
|
||||||
for tool in self._standalones:
|
|
||||||
print "[WARNING] Tool \"%s\" is not part of any project." % tool
|
|
||||||
else:
|
|
||||||
for project in self._projects:
|
|
||||||
project.activateAll ()
|
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
def _guessOs ( self ):
|
def _guessOs ( self ):
|
||||||
self._osSLSoC5x_64 = re.compile (".*Linux.*el5.*x86_64.*")
|
self._osSLSoC5x_64 = re.compile (".*Linux.*el5.*x86_64.*")
|
||||||
self._osSLSoC5x = re.compile (".*Linux.*(el5|2.6.23.13.*SoC).*")
|
self._osSLSoC5x = re.compile (".*Linux.*(el5|2.6.23.13.*SoC).*")
|
||||||
|
@ -287,6 +272,14 @@ class ProjectBuilder:
|
||||||
if self._environment.has_key(topUserVariable):
|
if self._environment.has_key(topUserVariable):
|
||||||
print "Transmitting %s = \"%s\"." % (topUserVariable,self._environment[topUserVariable])
|
print "Transmitting %s = \"%s\"." % (topUserVariable,self._environment[topUserVariable])
|
||||||
|
|
||||||
|
if tools:
|
||||||
|
# Checks if the requested tools are in the various projects.
|
||||||
|
self._standalones = tools
|
||||||
|
for project in self._projects:
|
||||||
|
self._standalones = project.activate ( self._standalones )
|
||||||
|
for tool in self._standalones:
|
||||||
|
print "[WARNING] Tool \"%s\" is not part of any project." % tool
|
||||||
|
|
||||||
if projects:
|
if projects:
|
||||||
for projectName in projects:
|
for projectName in projects:
|
||||||
project = self.getProject ( projectName )
|
project = self.getProject ( projectName )
|
||||||
|
@ -294,18 +287,19 @@ class ProjectBuilder:
|
||||||
print "[ERROR] No project of name \"%s\"." % projectName
|
print "[ERROR] No project of name \"%s\"." % projectName
|
||||||
sys.exit ( 1 )
|
sys.exit ( 1 )
|
||||||
project.activateAll()
|
project.activateAll()
|
||||||
for tool in project.getActives():
|
|
||||||
print "\nProcessing tool: \"%s\"." % tool
|
if not tools and not projects:
|
||||||
getattr(self,command) ( tool )
|
|
||||||
else:
|
|
||||||
self._orderTools ( tools )
|
|
||||||
for project in self._projects:
|
for project in self._projects:
|
||||||
for tool in project.getActives():
|
project.activateAll ()
|
||||||
print "\nProcessing tool: \"%s\"." % tool
|
|
||||||
getattr(self,command) ( tool )
|
for project in self._projects:
|
||||||
for tool in self._standalones:
|
for tool in project.getActives():
|
||||||
print "\nProcessing tool: \"%s\"." % tool
|
print "\nProcessing tool: \"%s\"." % tool
|
||||||
getattr(self,command) ( tool )
|
getattr(self,command) ( tool )
|
||||||
|
|
||||||
|
for tool in self._standalones:
|
||||||
|
print "\nProcessing tool: \"%s\"." % tool
|
||||||
|
getattr(self,command) ( tool )
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue