gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject svn commit: r158410 - in gump/trunk/python/gump: core/build/builder.py core/language/java.py core/run/gumpenv.py core/update/artifact.py core/update/updater.py tool/integration/__init__.py tool/integration/depot.py util/process/launcher.py
Date Mon, 21 Mar 2005 04:06:05 GMT
Author: ajack
Date: Sun Mar 20 20:06:03 2005
New Revision: 158410

URL: http://svn.apache.org/viewcvs?view=rev&rev=158410
Log:
Sad to see ya go Depot...

Removed:
    gump/trunk/python/gump/core/update/artifact.py
    gump/trunk/python/gump/tool/integration/depot.py
Modified:
    gump/trunk/python/gump/core/build/builder.py
    gump/trunk/python/gump/core/language/java.py
    gump/trunk/python/gump/core/run/gumpenv.py
    gump/trunk/python/gump/core/update/updater.py
    gump/trunk/python/gump/tool/integration/__init__.py
    gump/trunk/python/gump/util/process/launcher.py

Modified: gump/trunk/python/gump/core/build/builder.py
URL: http://svn.apache.org/viewcvs/gump/trunk/python/gump/core/build/builder.py?view=diff&r1=158409&r2=158410
==============================================================================
--- gump/trunk/python/gump/core/build/builder.py (original)
+++ gump/trunk/python/gump/core/build/builder.py Sun Mar 20 20:06:03 2005
@@ -67,8 +67,6 @@
 from gump.core.model.stats import *
 from gump.core.model.state import *
 
-import gump.tool.integration.depot
-
 
 ###############################################################################
 # Classes
@@ -427,12 +425,11 @@
         # See if we have any...
         artifacts = self.repository.extractMostRecentGroup(group)
         if not artifacts:
-            self.checkUpstreamRepositories(project)
             # Then try again...
             artifacts = self.repository.extractMostRecentGroup(group)
             
         # :TODO:
-        # If not artifacts, download using Depot?
+        # If not artifacts, download.
         
         artifactsOk=False
             
@@ -465,26 +462,6 @@
         else:                                 
             log.error(' ------ Extracted (fallback) artifacts from Repository : '+ project.getName())
 
             project.addInfo('Failed to extract fallback artifacts from Gump Repository')
 
-       
-    def checkUpstreamRepositories(self,project):
-        """
-        
-        See if we can download something...
-        
-        """
-        if self.run.getEnvironment().noDepot: return
-        
-        log.info(' ------ Check upstream repositories for : '+ project.getName())    
-        
-        cmd=gump.tool.integration.depot.getGroupUpdateCommand(project.getArtifactGroup(),
-                    self.repository.getRepositoryDir())
-        
-        # Execute the command ....
-        cmdResult=execute(cmd,self.run.getWorkspace().tmpdir)
-    
-        # Update context with the fact that this work was done
-        work=CommandWorkItem(WORK_TYPE_UPDATE,cmd,cmdResult)
-        project.performedWork(work)
          
     def preview(self,project,languageHelper):
         """

Modified: gump/trunk/python/gump/core/language/java.py
URL: http://svn.apache.org/viewcvs/gump/trunk/python/gump/core/language/java.py?view=diff&r1=158409&r2=158410
==============================================================================
--- gump/trunk/python/gump/core/language/java.py (original)
+++ gump/trunk/python/gump/core/language/java.py Sun Mar 20 20:06:03 2005
@@ -8,7 +8,7 @@
 # You may obtain a copy of the License at
 # 
 #     http://www.apache.org/licenses/LICENSE-2.0
-# 
+#
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -230,7 +230,7 @@
             #
             #	INHERIT_OUTPUTS (aka INHERIT_JARS) is more sticky, and we track that down (and
down, ...).
             #
-            if   (  ( ( 1 == level ) and \
+            if   (  ( ( 1 == depth ) and \
                  	(inherit in [ gump.core.model.depend.INHERIT_ALL, gump.core.model.depend.INHERIT_HARD
]) \
                     	or \
                     (inherit==gump.core.model.depend.INHERIT_RUNTIME and subdependency.isRuntime())
) \

Modified: gump/trunk/python/gump/core/run/gumpenv.py
URL: http://svn.apache.org/viewcvs/gump/trunk/python/gump/core/run/gumpenv.py?view=diff&r1=158409&r2=158410
==============================================================================
--- gump/trunk/python/gump/core/run/gumpenv.py (original)
+++ gump/trunk/python/gump/core/run/gumpenv.py Sun Mar 20 20:06:03 2005
@@ -44,7 +44,6 @@
 from gump.core.model.state import *
 from gump.core.model.propagation import *
 
-from gump.tool.integration.depot import *
 
 #TODO: any reason checkEnvironment can't simply be called once (on __init__)
 #      and after that simply used? It'd certainly simplify the code a bit..
@@ -73,8 +72,7 @@
     	
         self.noMono = False
         self.noNAnt = False    
-        self.noMaven = False    	 
-        self.noDepot = False    	
+        self.noMaven = False    	
         self.noSvn = False    	
         self.noCvs = False   
         self.noP4 = False   
@@ -92,9 +90,6 @@
         self.javaCommand = 'java'
         self.javacCommand = 'javac'
         
-        # DEPOT_HOME
-        self.depotHome = None
-        
         # Timezone and offset from UTC
         self.timezone = time.tzname
         self.timezoneOffset = time.timezone
@@ -131,12 +126,6 @@
             self.noMaven=True
             self.addWarning('MAVEN_HOME environmental variable not found, no maven builds.')
             
-        if not self.noDepot and not self._checkEnvVariable('DEPOT_HOME',False): 
-            self.noDepot=True
-            self.addWarning('DEPOT_HOME environmental variable not found, no depot downloads.')
-        
-        self.depotHome = getDepotHome(False)
-            
         # Check for executables
         
         self._checkExecutable('env','',False)
@@ -163,11 +152,6 @@
             self.noP4=True
             self.addWarning('"p4" command not found, no Perforce repository updates')
           
-        if not self.noDepot and \
-            not self._checkExecutable(getDepotUpdateCmd(),'-version',False,False,'check_depot_update'):

-            self.noDepot=True
-            self.addWarning('"depot update" command not found, no package downloads')
-        
         if not self.noMaven and \
             not self._checkExecutable('maven','--version',False,False,'check_maven'): 
             self.noMaven=True

Modified: gump/trunk/python/gump/core/update/updater.py
URL: http://svn.apache.org/viewcvs/gump/trunk/python/gump/core/update/updater.py?view=diff&r1=158409&r2=158410
==============================================================================
--- gump/trunk/python/gump/core/update/updater.py (original)
+++ gump/trunk/python/gump/core/update/updater.py Sun Mar 20 20:06:03 2005
@@ -30,7 +30,6 @@
 from gump.core.update.cvs import CvsUpdater
 from gump.core.update.svn import SvnUpdater
 from gump.core.update.p4 import P4Updater
-from gump.core.update.artifact import ArtifactUpdater
 
 from gump.util import dump, display, getIndent, logResourceUtilization, \
                             invokeGarbageCollection
@@ -59,7 +58,6 @@
         self.cvs=CvsUpdater(run)
         self.svn=SvnUpdater(run)
         self.p4=P4Updater(run)
-        self.artifact=ArtifactUpdater(run)
 
     """
     
@@ -101,7 +99,7 @@
     
         workspace = self.run.getWorkspace()
         
-        log.debug("Workspace CVS|SVN|P4|artifacts Directory: " + workspace.getSourceControlStagingDirectory())
+        log.debug("Workspace CVS|SVN|P4 Directory: " + workspace.getSourceControlStagingDirectory())
 
         # Update all the modules that have CVS repositories
         for module in list: 
@@ -129,8 +127,6 @@
                 ok=self.svn.updateModule(module)
             if module.hasP4():
                 ok=self.p4.updateModule(module)
-            elif module.hasArtifacts():
-                ok=self.artifact.updateModule(module)        
             else:
                 # :TODO: Now what?
                 pass
@@ -205,7 +201,5 @@
             ok=self.svn.preview(module)
         elif module.hasP4():
             ok=self.p4.preview(module)
-        elif module.hasArtifacts():
-            ok=self.artifact.preview(module)        
         else:
             print 'No updater for module: ' + module.getName()            

Modified: gump/trunk/python/gump/tool/integration/__init__.py
URL: http://svn.apache.org/viewcvs/gump/trunk/python/gump/tool/integration/__init__.py?view=diff&r1=158409&r2=158410
==============================================================================
--- gump/trunk/python/gump/tool/integration/__init__.py (original)
+++ gump/trunk/python/gump/tool/integration/__init__.py Sun Mar 20 20:06:03 2005
@@ -23,5 +23,5 @@
 ###############################################################################
 
 # tell Python what modules make up the gump.net package
-__all__ = ["cvs","depot"]
+__all__ = ["cvs"]
 

Modified: gump/trunk/python/gump/util/process/launcher.py
URL: http://svn.apache.org/viewcvs/gump/trunk/python/gump/util/process/launcher.py?view=diff&r1=158409&r2=158410
==============================================================================
--- gump/trunk/python/gump/util/process/launcher.py (original)
+++ gump/trunk/python/gump/util/process/launcher.py Sun Mar 20 20:06:03 2005
@@ -22,6 +22,7 @@
 import sys
 import logging
 import signal
+import re
 
 from string import split
 
@@ -89,19 +90,20 @@
             # Child gets PID = 0
             if 0 == forkPID:
                 # Run the information within this file...
-                sys.exit(runProcess(execFilename))
+                os._exit(runProcess(execFile))
             
             # Parent gets real PID
             else:
                 # Timeout support
                 timer = None
-                if timeout:
+                if cmd.timeout:
                     import threading
-                    timer = threading.Timer(timeout, shutdownProcessAndProcessGroup, [forkPID])
+                    timer = threading.Timer(cmd.timeout, \
+		    		shutdownProcessAndProcessGroup, [forkPID])
                     timer.start()
             
                 # Run the command
-                waitcode = os.wait(forkPID,0)
+                (childPID, waitcode) = os.waitpid(forkPID,0)
                 
                 # Stop timer (if still running)
                 if timer and timer.isAlive(): 
@@ -168,7 +170,7 @@
                 result.state = command.CMD_STATE_SUCCESS                
      
       except Exception, details :
-          log.error('Failed to launch command. Details: ' + str(details)) 
+          log.error('Failed to launch command. Details: ' + str(details), exc_info=1) 
           result.exit_code = -1
           result.state = command.CMD_STATE_FAILED
         
@@ -283,7 +285,6 @@
     return exit_code
 
 if __name__=='__main__':
-    import re
     
     exit_code = 0
     execFilename = sys.argv[1]



Mime
View raw message