Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 21464 Details for
Bug 34700
Small addon for emerge (emerge --continue)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
addon for emerge tool (continue option)
emerge.patch (text/plain), 7.97 KB, created by
Martín
on 2003-11-29 08:13:00 UTC
(
hide
)
Description:
addon for emerge tool (continue option)
Filename:
MIME Type:
Creator:
Martín
Created:
2003-11-29 08:13:00 UTC
Size:
7.97 KB
patch
obsolete
>--- /usr/lib/portage/bin/ebuild.sh.old 2003-11-27 12:24:07.000000000 -0300 >+++ usr/lib/portage/bin/ebuild.sh 2003-11-27 13:58:12.000000000 -0300 >@@ -378,6 +378,16 @@ > fi > } > >+src_compile_continue() { >+ emake || ERROR="si" >+ if [ "${ERROR}" == "si" ]; then >+ echo "!!! make failed, restarting configure." >+ ERROR="" >+ CONTINUE="" >+ dyn_compile >+ fi >+} >+ > src_install() > { > return >@@ -451,6 +461,11 @@ > pkg_setup || die "pkg_setup function failed; exiting." > } > >+dyn_continue() { >+ CONTINUE="yes" >+ dyn_compile >+} >+ > dyn_unpack() { > trap "abort_unpack" SIGINT SIGQUIT > local newstuff="no" >@@ -696,7 +711,13 @@ > #some packages use an alternative to $S to build in, cause > #our libtool to create problematic .la files > export PWORKDIR="$WORKDIR" >- src_compile >+ >+ if [ "${CONTINUE}" == "yes" ]; then >+ src_compile_continue >+ else >+ src_compile >+ fi >+ > #|| abort_compile "fail" > cd ${BUILDDIR} > touch .compiled >@@ -1222,7 +1243,7 @@ > set +x > fi > ;; >- unpack|compile|clean|install) >+ unpack|compile|clean|install|continue) > if [ "${SANDBOX_DISABLED="0"}" == "0" ]; then > export SANDBOX_ON="1" > else >--- /usr/lib/portage/bin/emerge.old 2003-11-27 12:23:59.000000000 -0300 >+++ usr/lib/portage/bin/emerge 2003-11-27 16:00:23.000000000 -0300 >@@ -54,7 +54,8 @@ > "--skipfirst", > "--update", "--upgradeonly", > "--usepkg", "--usepkgonly", >-"--verbose", "--version" >+"--verbose", "--version", >+"--continue", "--continue" > ] > > shortmapping={ >@@ -74,7 +75,8 @@ > "q":"--quiet", > "s":"--search", "S":"--searchdesc", > "u":"--update", "U":"--upgradeonly", >-"v":"--verbose", "V":"--version" >+"v":"--verbose", "V":"--version", >+"Co": "--continue" > } > > myaction=None >@@ -152,6 +154,9 @@ > print "emerge: please specify a package class (\"world\" or \"system\") or individual packages, but not both." > sys.exit(1) > >+if ("--continue" in myopts): >+ myopts.append("--resume") >+ > # Always create packages if FEATURES=buildpkg > # Imply --buildpkg if --buildpkgonly > if ("buildpkg" in portage.features) or ("--buildpkgonly" in myopts): >@@ -1213,11 +1218,18 @@ > > if ("--resume" in myopts): > # We're resuming. >- print green("*** Resuming merge...") >- emergelog(" *** Resuming merge...") >+ if ("--continue" in myopts): >+ print green("*** Continuing merge...") >+ emergelog(" *** Continuing merge...") >+ else: >+ print green("*** Resuming merge...") >+ emergelog(" *** Resuming merge...") >+ > mymergelist=portage.mtimedb["resume"]["mergelist"][:] > if ("--skipfirst" in myopts) and mymergelist: > del mymergelist[0] >+ >+ > else: > myfavs=portage.grabfile(portage.root+"var/cache/edb/world") > myfavdict=genericdict(myfavs) >@@ -1289,13 +1301,18 @@ > if retval==None: > sys.exit(1) > else: >- emergelog(" === ("+str(mergecount)+" of "+str(len(mymergelist))+") Cleaning ("+y+")") >- retval=portage.doebuild(y,"clean",myroot,edebug) >- if retval: >- sys.exit(1) >+ merge_command="continue" >+ if ("--continue" not in myopts): >+ merge_command="merge" >+ print (" === ("+str(mergecount)+" of "+str(len(mymergelist))+") Cleaning ("+y+")") >+ emergelog(" === ("+str(mergecount)+" of "+str(len(mymergelist))+") Cleaning ("+y+")") >+ retval=portage.doebuild(y,"clean",myroot,edebug) >+ if retval: >+ sys.exit(1) > portage.settings["FEATURES"]=myorigfeat # Put back flags. > emergelog(" === ("+str(mergecount)+" of "+str(len(mymergelist))+") Compiling/Merging ("+y+")") >- retval=portage.doebuild(y,"merge",myroot,edebug) >+ >+ retval=portage.doebuild(y,merge_command,myroot,edebug) > if retval: > sys.exit(1) > #dynamically update our database >@@ -2025,7 +2042,8 @@ > if ("--resume" in myopts): > del myopts[myopts.index("--resume")] > print darkgreen("emerge: It seems we have nothing to resume...") >- sys.exit(0) >+ if ("--continue" not in myopts): >+ sys.exit(0) > > mydepgraph=depgraph(myaction,myopts) > if myaction in ["system","world"]: >--- /usr/lib/portage/bin/emergehelp.py.old 2003-11-28 13:21:06.856901120 -0300 >+++ /usr/lib/portage/bin/emergehelp.py 2003-11-27 13:32:06.000000000 -0300 >@@ -1,7 +1,7 @@ > #!/usr/bin/env python2.2 > # Copyright 1999-2003 Gentoo Technologies, Inc. > # Distributed under the terms of the GNU General Public License v2 >-# $Header: /home/cvsroot/gentoo-src/portage/bin/emergehelp.py,v 1.16 2003/08/16 07:28:22 carpaski Exp $ >+# $Header: /home/cvsroot/gentoo-src/portage/bin/emergehelp.py,v 1.17 2003/10/06 14:09:43 caleb Exp $ > > import os,sys > from output import * >@@ -129,7 +129,7 @@ > print " systems (build once, emerge tbz2s everywhere)." > print > print " "+green("--buildpkgonly")+" ("+green("-B")+" short option)" >- print " Creates binary a binary package, but does not merge it to the" >+ print " Creates a binary package, but does not merge it to the" > print " system. This has the restriction that unsatisfied dependencies" > print " must not exist for the desired package as they cannot be used if" > print " they do not exist on the system." >@@ -141,7 +141,11 @@ > print " "+green("--columns") > print " Display the pretend output in a tabular form. Versions are" > print " aligned vertically." >- print >+ print >+ print " "+green("--continue")+" ("+green("-Co")+" short option)" >+ print " Resume (or pretend to resume) the last merge operation. " >+ print " '--continue' emit the 'clean' operation, and start from the last 'make' action" >+ print > print " "+green("--debug")+" ("+green("-d")+" short option)" > print " Tell emerge to run the ebuild command in --debug mode. In this" > print " mode, the bash build environment will run with the -x option," >--- /usr/lib/python2.2/site-packages/portage.py.old 2003-11-27 12:24:25.000000000 -0300 >+++ usr/lib/python2.2/site-packages/portage.py 2003-11-27 16:34:22.000000000 -0300 >@@ -1514,16 +1514,21 @@ > return digestCheckFiles(myfiles, mydigests, basedir, "src_uri") > > # parse actionmap to spawn ebuild with the appropriate args >-def spawnebuild(mydo,actionmap,debug,alwaysdep=0): >+def spawnebuild(mydo,actionmap,debug,alwaysdep=0,continue_flag=0): > if alwaysdep or ("noauto" not in features): > # process dependency first > if "dep" in actionmap[mydo].keys(): >- retval=spawnebuild(actionmap[mydo]["dep"],actionmap,debug,alwaysdep) >+ retval=spawnebuild(actionmap[mydo]["dep"],actionmap,debug,alwaysdep,continue_flag) > if retval: > return retval > # spawn ebuild.sh > mycommand="/usr/sbin/ebuild.sh " >- return spawn(mycommand + mydo,debug, >+ >+ if ( continue_flag == 1 ) and ( mydo == "compile" ): >+ comando = mycommand + "continue" >+ else: >+ comando= mycommand + mydo >+ return spawn(comando,debug, > actionmap[mydo]["args"][0], > actionmap[mydo]["args"][1]) > >@@ -1532,7 +1537,7 @@ > if mydo not in ["help","clean","prerm","postrm","preinst","postinst", > "config","touch","setup","depend","fetch","digest", > "unpack","compile","install","rpm","qmerge","merge", >- "package","unmerge", "manifest"]: >+ "package","unmerge", "manifest", "continue"]: > sys.stderr.write("!!! doebuild: Please specify a valid command.\n"); > return 1 > if not os.path.exists(myebuild): >@@ -1787,8 +1792,10 @@ > elif mydo=="qmerge": > #qmerge is specifically not supposed to do a runtime dep check > return merge(settings["CATEGORY"],settings["PF"],settings["D"],settings["BUILDDIR"]+"/build-info",myroot) >- elif mydo=="merge": >- retval=spawnebuild("install",actionmap,debug,1) >+ elif ( mydo == "merge" ) or ( mydo == "continue" ): >+ continue_f=0 >+ if ( mydo == "continue"): continue_f=1 >+ retval=spawnebuild("install",actionmap,debug,1,continue_f) > if retval: return retval > return merge(settings["CATEGORY"],settings["PF"],settings["D"],settings["BUILDDIR"]+"/build-info",myroot,myebuild=settings["EBUILD"]) > else:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 34700
: 21464