summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-05-17 22:30:37 +0000
committerZac Medico <zmedico@gentoo.org>2006-05-17 22:30:37 +0000
commit8a945580fc498eb6cf4a94efe1b6682be9f2b746 (patch)
treea4df2b692838da11473c9a7da390d97faee31ab9
parentbce8661dde76cad0be512dcc58827c35e16fb336 (diff)
downloadportage-8a945580fc498eb6cf4a94efe1b6682be9f2b746.tar.gz
portage-8a945580fc498eb6cf4a94efe1b6682be9f2b746.tar.bz2
portage-8a945580fc498eb6cf4a94efe1b6682be9f2b746.zip
When portage is upgraded, only restart emerge when destroot="/". Also, clean up and fix the related logic in depgraph.display().
svn path=/main/trunk/; revision=3369
-rwxr-xr-xbin/emerge44
1 files changed, 22 insertions, 22 deletions
diff --git a/bin/emerge b/bin/emerge
index c9b8cd899..7bb8323ef 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -1754,27 +1754,27 @@ class depgraph:
myprint="["+x[0]+" "+addl+"] "+indent+darkgreen(x[2])+" "+myoldbest+" "+verboseadd
p.append(myprint)
- if ("--tree" not in myopts):
- mysplit=portage.pkgsplit(x[2])
-
- # XXX mysplit _can_ be None.... Why?
- if mysplit and (len(mysplit)==3):
- if "--emptytree" not in myopts:
- if mysplit[0]=="sys-apps/portage":
- if ((mysplit[1]+mysplit[2]) != portage.VERSION) and \
- ("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(" then resume the merge."))
- print
- else:
- if mysplit[0]=="sys-apps/portage" and ("--emptytree" in myopts):
- if mysplit[1]+mysplit[2]!=portage.VERSION:
- p.append(red("***")+" Please update portage to the above version before proceeding.")
- p.append(" Failure to do so may result in failed or improper merges.")
- p.append(" A simple '"+green("emerge -u portage")+"' is sufficient.")
- p.append("")
- del mysplit
+ mysplit = portage.pkgsplit(x[2])
+ if "--tree" not in myopts and mysplit and len(mysplit) == 3 and \
+ mysplit[0] == "sys-apps/portage" and x[1] == "/":
+
+ if mysplit[2] == "r0":
+ myversion = mysplit[1]
+ else:
+ myversion = "%s-%s" % (mysplit[1], mysplit[2])
+
+ if myversion != portage.VERSION :
+ if "--emptytree" in myopts:
+ p.append(red("***")+" Please update portage to the above version before proceeding.")
+ p.append(" Failure to do so may result in failed or improper merges.")
+ p.append(" A simple '"+green("emerge portage")+"' is sufficient.")
+ p.append("")
+ elif mylist.index(x) < len(mylist) - 1 and \
+ "livecvsportage" not in portage.settings.features:
+ p.append(red("*** Portage will stop merging at this point and reload itself,"))
+ p.append(red(" then resume the merge."))
+ print
+ del mysplit
for x in p:
print x
@@ -2084,7 +2084,7 @@ class depgraph:
# Figure out if we need a restart.
mysplit=portage.pkgsplit(x[2])
- if mysplit[0]=="sys-apps/portage":
+ if mysplit[0] == "sys-apps/portage" and x[1] == "/":
myver=mysplit[1]+"-"+mysplit[2]
if myver[-3:]=='-r0':
myver=myver[:-3]