[cvs] / gkb / gkb.py  

cvs: gkb/gkb.py

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

version 1.24, Sun Aug 15 04:43:15 2004 UTC version 1.25, Sun Aug 15 04:53:49 2004 UTC
Line 105 
Line 105 
   
 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 " + clean(cmd), kinfo)
   
         p4obj = popen2.Popen4(cmd)          p4obj = popen2.Popen4(cmd)
   
Line 132 
Line 132 
         if err == None:          if err == None:
                 err = 0                  err = 0
   
         log("    result code: %i" %  err, kinfo)          log("    \_ exit code: %i" %  err, kinfo)
   
         return err          return err
   
Line 146 
Line 146 
         """Supporting method to verify a given  exists, if not it will create it"""          """Supporting method to verify a given  exists, if not it will create it"""
         log("verifying directory " + mydir,kinfo)          log("verifying directory " + mydir,kinfo)
         if not os.path.isdir(mydir):          if not os.path.isdir(mydir):
                 log("%s doesn't exist, creating" % mydir,kinfo)                  log("  \_ %s doesn't exist, creating" % mydir,kinfo)
                 os.mkdir(mydir)                  os.mkdir(mydir)
         return mydir          return mydir
   
Line 177 
Line 177 
         version=krn_localversion(kinfo)          version=krn_localversion(kinfo)
         log("querying distribution site manager with command '%s' (kernel version=%s)" % (command,version),kinfo)          log("querying distribution site manager with command '%s' (kernel version=%s)" % (command,version),kinfo)
         result=getoutput("wget --quiet --output-document=- \"%s/manager.php?cmd=%s&host=%s&pass=%s&build=%s&version=%s\"" % (msite,command,host,passwd,kinfo["name"],version))          result=getoutput("wget --quiet --output-document=- \"%s/manager.php?cmd=%s&host=%s&pass=%s&build=%s&version=%s\"" % (msite,command,host,passwd,kinfo["name"],version))
         log("result: '"+result+"'",kinfo)          log("  \_ result: '"+result+"'",kinfo)
         return result=="1"          return result=="1"
   
 def krn_localversion(kinfo):  def krn_localversion(kinfo):
Line 194 
Line 194 
         verifydir("%s/%s" % (patchdir, kinfo["name"]),kinfo)          verifydir("%s/%s" % (patchdir, kinfo["name"]),kinfo)
   
         # sync the source to make sure we are up to date ...          # sync the source to make sure we are up to date ...
         log("calling gkb_getsource",kinfo)          log("fetching latest source",kinfo)
         gkb_getsource(kinfo)          gkb_getsource(kinfo)
   
         # go into the work directory          # go into the work directory
Line 482 
Line 482 
         today=getoutput("date +%D")          today=getoutput("date +%D")
         buildtime=getoutput("date +'%R:%S %Z'")          buildtime=getoutput("date +'%R:%S %Z'")
   
         print "GKB started %s %s" % (today,buildtime)          print "GNU Kernel Builder started %s %s" % (today,buildtime)
   
         # verify the existence important directories, and create if necessary          # verify the existence important directories, and create if necessary
         verifydir(logdir)          verifydir(logdir)
Line 492 
Line 492 
         verifydir("%s/work" % buildroot) # build dir, make sure it exists          verifydir("%s/work" % buildroot) # build dir, make sure it exists
   
         # download the build jobs from the master site          # download the build jobs from the master site
           log("fetching build jobs from master site")
         if runcmd("wget --quiet --output-document=gkb.xml \"%s/manager.php?cmd=getjobs&host=%s&pass=%s\"" % (msite,host,passwd)):          if runcmd("wget --quiet --output-document=gkb.xml \"%s/manager.php?cmd=getjobs&host=%s&pass=%s\"" % (msite,host,passwd)):
                 raise FatalError, "Unable to download build config from master site %s, aborting." % msite                  raise FatalError, "Unable to download build jobs from master site %s, aborting." % msite
   
         # sets up 'mastertrees' and 'builds' dicts          # sets up 'mastertrees' and 'builds' dicts
         gkb_parsexml('gkb.xml')          gkb_parsexml('gkb.xml')


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

Tobias McNulty

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help