[cvs] / gkb / gkb.py  

cvs: gkb/gkb.py

Diff for /gkb/gkb.py between version 1.37 and 1.39

version 1.37, Fri Apr 29 16:13:36 2005 UTC version 1.39, Fri Oct 6 14:16:07 2006 UTC
Line 253 
Line 253 
         if kinfo["type"] == "kernel24":          if kinfo["type"] == "kernel24":
                 krn_build24(kinfo)                  krn_build24(kinfo)
         elif kinfo["type"] == "kernel26":          elif kinfo["type"] == "kernel26":
                 krn_build24(kinfo) #run kernel24 for now, change later                  krn_build26(kinfo)
   
                 # Gerk comment:                  # Gerk comment:
                 # Do we need to change this with 24/26?  we probably don't ... I'd rather see us define the list of make targets                  # Do we need to change this with 24/26?  we probably don't ... I'd rather see us define the list of make targets
Line 360 
Line 360 
 def krn_build26(kinfo):  def krn_build26(kinfo):
         """build a kernel, version 2.6"""          """build a kernel, version 2.6"""
   
           if krn_querymgr("checkout",kinfo):
                   try:
                           myversion=krn_localversion(kinfo)
   
                           # fetch and cp the config file to work/.config
                           krn_config(kinfo)
   
                           # **Note** : we set the preprocessing command to premake inline instead
                           # of globally as it is only needed in this target
                           if dont_build==0:
                                   gkb_runmake("oldconfig",kinfo,premake+" /bin/cat %s/newlines | " % buildroot,makeopts)
   
                           # give option to only repackage for testing purposes, comment out clean=1 at top of this file to use this feature
                           if (clean==1 and dont_build==0):
                                   gkb_runmake("clean", kinfo, premake, makeopts)
   
                           if dont_build==0:
                                   gkb_runmake("", kinfo, premake, makeopts)
   
                           # We should check to see if binary built ok, if not bail out
                           mybindir=bindir+"/linux-"+kinfo["name"]+"-"+myversion
                           verifydir(mybindir,kinfo)
                           verifydir(mybindir+"/boot",kinfo)
   
                           kbinloc=kinfo["workdir"]+"/"+kinfo["binpath"]+"/"+kinfo["binname"]
                           if verifyfile(kbinloc,kinfo):
                                   # the binary exists, so let's cp it to bin...
                                   copy(kbinloc,mybindir+"/boot/"+kinfo["binname"]+"-"+myversion)
                                   copy("%s/System.map" % kinfo["workdir"],mybindir+"/boot/System.map-"+myversion)
                           else:
                                   # the binary is not there, inform user and bail out with error
                                   raise BuildError("%s is not present, assuming build failure and exiting.  See log for details." % kbinloc)
   
                           if krn_modulesenabled(kinfo):
                                   # now that we know he binary built, let's continue
                                   if dont_build==0:
                                           gkb_runmake("modules",kinfo, premake, makeopts)
   
                                   # **Note** : we prepend the INSTALL_MOD_PATH to the makeopts inline instead
                                   # of globally as it is only needed in this target
                                   gkb_runmake("modules_install", kinfo, premake, "INSTALL_MOD_PATH=%s %s" % (mybindir, makeopts))
                           else:
                                   log("skipping make modules (disabled in .config)",kinfo)
   
                           # compress and upload source archive
                           chdir(kinfo["workdir"]+"/..",kinfo)
                           archive_name = "src-%s.tar.bz2" % kinfo["mastertree"],
   
                           # compress and upload kernel binary
                           chdir(bindir,kinfo)
                           archive_name = "linux-%s-%s.tar.bz2" % (kinfo["name"], myversion)
   
                           log("compressing binary archive "+archive_name,kinfo)
   
                           if runcmd("tar cjf "+archive_name+" "+os.path.basename(mybindir), kinfo):
                                   raise BuildError("failed to `tar cjf %s`" %  archive_name)
   
                           runcmd("rm -rf %s" % mybindir, kinfo)
   
                           krn_upload(archive_name,"kernel",myversion,kinfo)
                           krn_querymgr("checkin",kinfo)
   
   #                       if os.fork() == 0:
   #                               #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)
   #                               finally:
   #                                       sys.exit(0)
   
                           log("returning source directory to clean state",kinfo)
                           gkb_getsource(kinfo)
   
                   except BuildError, e:
                           log(e.message, kinfo)
                           krn_querymgr("checkin",kinfo,"&failed=%s" % krn_localversion(kinfo))
                   except:
                           krn_querymgr("checkin",kinfo,"&failed=%s" % krn_localversion(kinfo))
                           raise
   
 # source get routines  # source get routines
 def gkb_getsource(kinfo):  def gkb_getsource(kinfo):
         """method to perform source sync on demand, currenty only supports rsync, but others can be added"""          """method to perform source sync on demand, currenty only supports rsync, but others can be added"""
Line 535 
Line 625 
         form["version"] = version          form["version"] = version
   
         #form.add_file(open(file), "application/x-bzip2", os.path.basename(file))          #form.add_file(open(file), "application/x-bzip2", os.path.basename(file))
           runcmd("ssh www.ppckernel.org 'mkdir -p %s/%s/'" % (uploaddir,kinfo["name"]))
         runcmd("scp %s www.ppckernel.org:%s/%s/" % (os.path.basename(file),uploaddir,kinfo["name"]))          runcmd("scp %s www.ppckernel.org:%s/%s/" % (os.path.basename(file),uploaddir,kinfo["name"]))
   
         # form.click() returns a urllib2.Request object          # form.click() returns a urllib2.Request object


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

Tobias McNulty

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help