[Aptitude-svn-commit] r4125 - in branches/aptitude-0.3/aptitude: .
src/generic
Daniel Burrows
dburrows at costa.debian.org
Tue Sep 20 04:29:13 UTC 2005
Author: dburrows
Date: Tue Sep 20 04:29:10 2005
New Revision: 4125
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/generic/resolver_manager.cc
Log:
Push interrupted jobs back onto the queue so the resolver actually restarts.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Tue Sep 20 04:29:10 2005
@@ -1,5 +1,11 @@
2005-09-19 Daniel Burrows <dburrows at debian.org>
+ * src/generic/resolver_manager.cc:
+
+ When the resolver is interrupted, put the job we were working on
+ back onto the queue, so that we start working on it again at the
+ next opportunity.
+
* src/broken_indicator.cc:
Format the statistics in the interactive UI better.
Modified: branches/aptitude-0.3/aptitude/src/generic/resolver_manager.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/resolver_manager.cc (original)
+++ branches/aptitude-0.3/aptitude/src/generic/resolver_manager.cc Tue Sep 20 04:29:10 2005
@@ -130,6 +130,15 @@
}
catch(InterruptedException)
{
+ // Put it back into the pot.
+ l.acquire();
+ background_thread_in_resolver = false;
+ background_resolver_cond.wake_all();
+ pending_jobs.push(job);
+
+ // HACK: protect job.k from deletion.
+ job.k = NULL;
+ l.release();
}
catch(NoMoreSolutions)
{
More information about the Aptitude-svn-commit
mailing list