diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-02-05 19:22:00 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-02-05 19:22:00 +0000 |
commit | 56a249218ba1519965f0bccaf9aca676a50b7ce6 (patch) | |
tree | e200c9bd3181c720a2574e61fecc5073487cb585 | |
parent | 270a2fd1fe8bf3eca1f575d67e0cfbd043def4c5 (diff) | |
download | portage-56a249218ba1519965f0bccaf9aca676a50b7ce6.tar.gz portage-56a249218ba1519965f0bccaf9aca676a50b7ce6.tar.bz2 portage-56a249218ba1519965f0bccaf9aca676a50b7ce6.zip |
replace existing "restarting emerge via exec()" functionality with a new approach that uses --resume and myopts
svn path=/main/trunk/; revision=2667
-rwxr-xr-x | bin/emerge | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/bin/emerge b/bin/emerge index 5ee4bc23f..6885cef58 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1783,7 +1783,7 @@ class depgraph: ("livecvsportage" not in portage.settings.features): if mylist.index(x)<len(mylist)-1: p.append(red("*** Portage will stop merging at this point and reload itself,")) - p.append(red(" recalculate dependencies, and complete the merge.")) + p.append(red(" then resume the merge.")) if "--update" not in myopts: p.append(darkgreen(" You may avoid the remerging of packages by updating portage on its own.")) print @@ -2119,36 +2119,16 @@ class depgraph: if (myver != portage.VERSION) and \ ("livecvsportage" not in portage.settings.features): if len(mymergelist) > mergecount: - myargv=sys.argv - myr=0 - for myra in range(len(myargv)): - if myargv[myr][0:len("portage")]=="portage": - del myargv[myr] - myr-=1 - if myargv[myr][0:len("sys-apps/portage")]=="sys-apps/portage": - del myargv[myr] - myr-=1 - myr+=1 emergelog(" *** RESTARTING emerge via exec() after change of portage version.") + del portage.mtimedb["resume"]["mergelist"][0] portage.portageexit() - # Remove --ask from options before restarting mynewargv=[] - badlongopts = ["--ask","--tree","--changelog"] - badshortopts = ["a","t","l"] - for arg in myargv: - if arg[0:2] == "--": - if arg in badlongopts: - continue - mynewargv += [arg] - elif arg[0] == "-": - myarg = "-" - for ch in arg[1:]: - if ch in badshortopts: - continue - myarg += ch - mynewargv += [myarg] - else: - mynewargv += [arg] + badlongopts = ("--ask","--tree","--changelog","--skipfirst","--resume") + for arg in myopts: + if arg in badlongopts: + continue + mynewargv.append(arg) + mynewargv.append("--resume") os.execv("/usr/lib/portage/bin/emerge", mynewargv) if ("--pretend" not in myopts) and ("--fetchonly" not in myopts) and ("--fetch-all-uri" not in myopts): |