You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by aj...@apache.org on 2003/10/16 19:25:49 UTC

cvs commit: jakarta-gump/python/gump build.py nag.py

ajack       2003/10/16 10:25:49

  Modified:    python/gump build.py nag.py
  Log:
  Keep bashing at nagging...
  
  Revision  Changes    Path
  1.25      +18 -5     jakarta-gump/python/gump/build.py
  
  Index: build.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/build.py,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- build.py	14 Oct 2003 16:58:43 -0000	1.24
  +++ build.py	16 Oct 2003 17:25:49 -0000	1.25
  @@ -226,8 +226,21 @@
                           listDirectoryAsWork(pctxt,repository.getGroupDir(module.name), \
                                                   'list_repo_'+project.name) 
                       
  -                    elif project.home:
  -                        listDirectoryAsWork(pctxt,project.home,'list_'+project.name)                          
  +                    else:
  +                        #
  +                        # List all directories that should've contained
  +                        # outputs, to see what is there.
  +                        #
  +                        dirs=[]
  +                        for i in range(0,len(project.jar)):
  +                        jar=os.path.normpath(project.jar[i].path)
  +                        if jar:
  +                            dir=os.path.dirname(jar)
  +                            if not dir in dirs and os.path.exists(dir):
  +                                listDirectoryAsWork(pctxt,dir,'list_'+project.name+'_'+os.path.basename(dir))
  +                                dirs.append(dir)
  +                            else
  +                                pctxt.addWarning("No such directory (where output is expect) : " + dir)
                   else:
                       pctxt.status=STATUS_SUCCESS  
   
  
  
  
  1.13      +23 -9     jakarta-gump/python/gump/nag.py
  
  Index: nag.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/nag.py,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- nag.py	15 Oct 2003 23:44:37 -0000	1.12
  +++ nag.py	16 Oct 2003 17:25:49 -0000	1.13
  @@ -93,13 +93,12 @@
                               # :TODO: Something doesn't work w/ this.
                               # if projectFilterList and not pctxt.project in projectFilterList: continue
                               project=Project.list[pname]
  -                            if project.nag:
  -                                try:
  -                                    nagProject(workspace,context,module,mctxt,project,pctxt)
  -                                except:
  -                                    log.error("Failed to send nag e-mail for project " + pname)
  -                            else:
  -                                log.error("Project naggable w/ nowhere to nag")   
  +                            try:
  +                                nagProject(workspace,context,module,mctxt,project,pctxt)
  +                            except:
  +                                log.error("Failed to send nag e-mail for project " + pname)
  +                        else:
  +                            log.error("Unknown project " + pname)
                   
                   
   def nagWorkspace(workspace,context):
  @@ -122,6 +121,7 @@
       content+=getContent(workspace,pctxt,"Project: " + project.name + "\n"    )
       content+="\n\n\n"
           
  +    nags=0
       for nagEntry in project.nag:
           try:
               #
  @@ -136,9 +136,23 @@
           
               # Fire ...
               mail(toaddrs,fromaddr,email,workspace.mailserver) 
  +            
  +            nags+=1
           except:
               log.error("Failed to send nag e-mail for project " + project.name)
               log.error(content)
  +            
  +    # Belt and braces (nag to us if not nag to them)
  +    if not nags:
  +        email=EmailMessage(workspace.prefix+': '+module.name+'/'+project.name+' '+stateName(pctxt.status),content)
  +        toaddr=workspace.mailinglist
  +        fromaddr=workspace.mailinglist
  +        
  +        # We send to a list, but a list of one is fine..
  +        toaddrs=[ workspace.mailinglist ] # :TODO: toaddr -> to users...
  +        
  +        # Fire ...
  +        mail(toaddrs,fromaddr,email,workspace.mailserver) 
       
   def getContent(workspace,context,message=''):
       content=''
  @@ -200,8 +214,8 @@
     
     nagWorkspace(workspace,context)
     
  -  module=Module.list['jakarta-gump']
  -  project=Project.list['gump']
  +  module=Module.list['krysalis-version']
  +  project=Project.list['krysalis-version']
     (mctxt,pctxt)=context.getContextsForProject(project)
     nagProject(workspace,context,module,mctxt,project,pctxt)