Do some basic validation of the mtimedb resume data so that assumptions can be made...
authorZac Medico <zmedico@gentoo.org>
Mon, 3 Jul 2006 19:26:30 +0000 (19:26 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 3 Jul 2006 19:26:30 +0000 (19:26 -0000)
svn path=/main/trunk/; revision=3779

bin/emerge

index 64a40c7fcf3dfdbe79c7ba4e6aafbc61e75360a4..172c6eede07f38b0c76050245cee80a4c5ae079b 100755 (executable)
@@ -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):