From 5dcc067352215541124bb4a28cef82f421494f9d Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 7 Aug 2008 14:00:24 +0000 Subject: [PATCH] In order to properly preserve --jobs and --load-average settings for --resume operations, store resume options in the mtimedb as a dict instead of a list. The dict type is supported in >=portage-2.1.3_rc8 (2.1.4.4 is current stable) so people switching between stable/unstable will be fine. svn path=/main/trunk/; revision=11343 --- pym/_emerge/__init__.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index a0c7c7378..b72f964a4 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -12450,6 +12450,10 @@ def action_build(settings, trees, mtimedb, for opt in ("--skipfirst", "--ask", "--tree"): resume_opts.pop(opt, None) myopts.update(resume_opts) + + if "--debug" in myopts: + writemsg_level("myopts %s\n" % (myopts,)) + # Adjust config according to options of the command being resumed. for myroot in trees: mysettings = trees[myroot]["vartree"].settings @@ -12779,9 +12783,10 @@ def action_build(settings, trees, mtimedb, del mtimedb["resume"] mtimedb.commit() mtimedb["resume"]={} - # XXX: Stored as a list for backward compatibility. - mtimedb["resume"]["myopts"] = \ - [k for k in myopts if myopts[k] is True] + # Stored as a dict starting with portage-2.2_rc7, and supported + # by >=portage-2.1.3_rc8. Versions