[cvs] / gkb / gkb.py  

cvs: gkb/gkb.py

Diff for /gkb/gkb.py between version 1.25 and 1.30

version 1.25, Sun Aug 15 04:53:49 2004 UTC version 1.30, Fri Dec 17 04:33:37 2004 UTC
Line 29 
Line 29 
 from urllib2 import urlopen  from urllib2 import urlopen
 from ClientForm import ParseResponse  from ClientForm import ParseResponse
   
   
 debug=0  debug=0
 clean=1  clean=1
 dont_build=0  dont_build=0
Line 91 
Line 92 
         if verbose==1:          if verbose==1:
                 print myoutput                  print myoutput
   
 def clean(text):  def cleantext(text):
         """clean a string of passwords, etc. to make it suitable for logging"""          """clean a string of passwords, etc. to make it suitable for logging"""
         result = string.replace(text,passwd,"XXXXXXXX")          result = string.replace(text,passwd,"XXXXXXXX")
         return result          return result
Line 105 
Line 106 
   
 def runcmd(cmd, kinfo=None, outfile=None, append=False, infile=None):  def runcmd(cmd, kinfo=None, outfile=None, append=False, infile=None):
         """run the specified command, with the optional input and output documents"""          """run the specified command, with the optional input and output documents"""
         log("  \_ running " + clean(cmd), kinfo)          log("  \_ running " + cleantext(cmd), kinfo)
   
         p4obj = popen2.Popen4(cmd)          p4obj = popen2.Popen4(cmd)
   
Line 198 
Line 199 
         gkb_getsource(kinfo)          gkb_getsource(kinfo)
   
         # go into the work directory          # go into the work directory
         chdir(workdir, kinfo)          #chdir(workdir, kinfo)
   
         # archive the clean source for later uploading          # archive the clean source for later uploading
         log("archiving source to " + kinfo["mastertree"] + ".tar.bz2", kinfo)          #log("archiving source to " + kinfo["mastertree"] + ".tar.bz2", kinfo)
         runcmd("tar cjf " + kinfo["mastertree"] + ".tar.bz2 " + kinfo["mastertree"], kinfo)          #runcmd("tar cjf " + kinfo["mastertree"] + ".tar.bz2 " + kinfo["mastertree"], kinfo)
   
         # now we'll go into the tree's work dir          # now we'll go into the tree's work dir
         chdir(kinfo["workdir"],kinfo)          chdir(kinfo["workdir"],kinfo)
Line 285 
Line 286 
                         krn_upload(archive_name,"kernel",myversion,kinfo)                          krn_upload(archive_name,"kernel",myversion,kinfo)
                         krn_querymgr("checkin",kinfo)                          krn_querymgr("checkin",kinfo)
   
                         if (os.fork() == 0):                          if os.fork() == 0:
                                 #in child                                  #in child
                                   try:
                                           # sync the source to make sure we are up to date ...
                                           log("re-fetching latest source",kinfo)
                                           gkb_getsource(kinfo)
   
                                           # go into the work directory
                                           chdir(workdir, kinfo)
   
                                           # archive the clean source for later uploading
                                           log("archiving source to " + kinfo["mastertree"] + ".tar.bz2", kinfo)
                                           runcmd("tar cjf " + kinfo["mastertree"] + ".tar.bz2 " + kinfo["mastertree"], kinfo)
   
                                 krn_upload(workdir + "/" + kinfo["mastertree"] + ".tar.bz2", "source", myversion, kinfo)                                  krn_upload(workdir + "/" + kinfo["mastertree"] + ".tar.bz2", "source", myversion, kinfo)
                                   finally:
                                 sys.exit(0)                                  sys.exit(0)
   
                 except BuildError, e:                  except BuildError, e:
Line 469 
Line 483 
                 print response.info()  # headers                  print response.info()  # headers
                 print response.read()  # body                  print response.read()  # body
   
         log("response: " + response.read(),kinfo)          log("  \_ response: " + response.read(),kinfo)
   
         response.close()          response.close()
   


Generate output suitable for use with a patch program
Legend:
Removed from v.1.25  
changed lines
  Added in v.1.30

Tobias McNulty

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help