summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/emerge13
-rw-r--r--pym/portage.py3
2 files changed, 14 insertions, 2 deletions
diff --git a/bin/emerge b/bin/emerge
index 7faf822ac..4ffdeb634 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -3146,7 +3146,13 @@ else:
print darkgreen("These are the packages that would be %s, in order:") % action
print
- if ("--resume" in myopts) and portage.mtimedb.has_key("resume"):
+ if "--resume" in myopts and \
+ ("resume" in portage.mtimedb or
+ "resume_backup" in portage.mtimedb):
+ if "resume" not in portage.mtimedb:
+ portage.mtimedb["resume"] = portage.mtimedb["resume_backup"]
+ del portage.mtimedb["resume_backup"]
+ portage.commit_mtimedb()
myresumeopts=portage.mtimedb["resume"]["myopts"][:]
for opt in ("--skipfirst", "--ask", "--verbose"):
@@ -3253,6 +3259,11 @@ else:
favorites=portage.mtimedb["resume"]["favorites"]
mydepgraph.merge(portage.mtimedb["resume"]["mergelist"])
else:
+ if "resume" in portage.mtimedb and \
+ len(portage.mtimedb["resume"]["mergelist"]) > 1:
+ portage.mtimedb["resume_backup"] = portage.mtimedb["resume"]
+ del portage.mtimedb["resume"]
+ portage.commit_mtimedb()
portage.mtimedb["resume"]={}
portage.mtimedb["resume"]["myopts"]=myopts
portage.mtimedb["resume"]["favorites"]=favorites
diff --git a/pym/portage.py b/pym/portage.py
index 9c0c8f1d9..dd007f1f1 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -6714,7 +6714,8 @@ mtimedb={}
mtimedbkeys=[
"updates", "info",
"version", "starttime",
-"resume", "ldpath"
+"resume", "resume_backup",
+"ldpath"
]
mtimedbfile=root+"var/cache/edb/mtimedb"
try: