summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-07-03 19:26:30 +0000
committerZac Medico <zmedico@gentoo.org>2006-07-03 19:26:30 +0000
commit82ed60c63dc253ab9365efb8f69fd49153469b7d (patch)
tree3beca96e859a29330ba893da5501f3b8bcef4ba4
parent6b141902dca0a989c8573b87b4d960de4f8db577 (diff)
downloadportage-82ed60c63dc253ab9365efb8f69fd49153469b7d.tar.gz
portage-82ed60c63dc253ab9365efb8f69fd49153469b7d.tar.bz2
portage-82ed60c63dc253ab9365efb8f69fd49153469b7d.zip
Do some basic validation of the mtimedb resume data so that assumptions can be made later.
svn path=/main/trunk/; revision=3779
-rwxr-xr-xbin/emerge10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/emerge b/bin/emerge
index 64a40c7fc..172c6eede 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -3262,6 +3262,16 @@ def action_build(settings, trees, mtimedb,
print darkgreen("These are the packages that would be %s, in order:") % action
print
+ # validate the state of the resume data
+ # so that we can make assumptions later.
+ for k in ("resume", "resume_backup"):
+ if k in mtimedb:
+ if "mergelist" in mtimedb[k]:
+ if not mtimedb[k]["mergelist"]:
+ del mtimedb[k]
+ else:
+ del mtimedb[k]
+
if "--resume" in myopts and \
("resume" in mtimedb or
"resume_backup" in mtimedb):