* [gentoo-commits] portage r10140 - main/branches/2.1.2/bin
@ 2008-05-03 21:17 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-05-03 21:17 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2008-05-03 21:17:05 +0000 (Sat, 03 May 2008)
New Revision: 10140
Modified:
main/branches/2.1.2/bin/emerge
Log:
When loadResumeCommand() rejects a resume list, give a more informative
explanation. (trunk r10139)
Modified: main/branches/2.1.2/bin/emerge
===================================================================
--- main/branches/2.1.2/bin/emerge 2008-05-03 21:08:27 UTC (rev 10139)
+++ main/branches/2.1.2/bin/emerge 2008-05-03 21:17:05 UTC (rev 10140)
@@ -4992,8 +4992,8 @@
# This probably means that a required package
# was dropped via --skipfirst. It makes the
# resume list invalid, so convert it to a
- # PackageNotFound exception.
- raise portage_exception.PackageNotFound(
+ # UnsatisfiedResumeDep exception.
+ raise self.UnsatisfiedResumeDep(
self._unsatisfied_deps[0].atom)
self._serialized_tasks_cache = None
try:
@@ -5063,6 +5063,13 @@
if arg not in refs:
refs.append(arg)
+ class UnsatisfiedResumeDep(portage_exception.PortageException):
+ """
+ A dependency of a resume list is not installed. This
+ can occur when a required package is dropped from the
+ merge list via --skipfirst.
+ """
+
class _internal_exception(portage_exception.PortageException):
def __init__(self, value=""):
portage_exception.PortageException.__init__(self, value)
@@ -7774,14 +7781,34 @@
success = False
try:
success = mydepgraph.loadResumeCommand(mtimedb["resume"])
- except portage_exception.PackageNotFound:
+ except (portage_exception.PackageNotFound,
+ mydepgraph.UnsatisfiedResumeDep), e:
if show_spinner:
print
+ from textwrap import wrap
from output import EOutput
out = EOutput()
- out.eerror("Error: The resume list contains packages that are no longer")
- out.eerror(" available to be emerged. Please restart/continue")
- out.eerror(" the merge operation manually.")
+
+ if isinstance(e, mydepgraph.UnsatisfiedResumeDep):
+ out.eerror("An expected dependency " + \
+ "is not installed: %s" % str(e))
+ out.eerror("")
+ msg = "The resume list contains packages " + \
+ "with dependencies that have not been " + \
+ "installed yet. Please restart/continue " + \
+ "the operation manually."
+ for line in wrap(msg, 72):
+ out.eerror(line)
+ elif isinstance(e, portage_exception.PackageNotFound):
+ out.eerror("An expected package is " + \
+ "not available: %s" % str(e))
+ out.eerror("")
+ msg = "The resume list contains one or more " + \
+ "packages that are no longer " + \
+ "available. Please restart/continue " + \
+ "the operation manually."
+ for line in wrap(msg, 72):
+ out.eerror(line)
else:
if show_spinner:
print "\b\b... done!"
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-05-03 21:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-03 21:17 [gentoo-commits] portage r10140 - main/branches/2.1.2/bin Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox