diff -u cwidget-0.5.12/debian/changelog cwidget-0.5.12/debian/changelog --- cwidget-0.5.12/debian/changelog +++ cwidget-0.5.12/debian/changelog @@ -1,3 +1,17 @@ +cwidget (0.5.12-4ubuntu1) jaunty; urgency=low + + * Merge from debian unstable (LP: #322918), Ubuntu remaining changes: + - Drop build depends on ikiwiki and libhtml-scrubber-perl. + + -- Alessio Treglia Thu, 29 Jan 2009 22:09:59 +0100 + +cwidget (0.5.12-4) unstable; urgency=low + + * Backport a fix for a nasty deadlock that was causing aptitude to + freeze up after running dpkg. (Closes: #511708) + + -- Daniel Burrows Tue, 27 Jan 2009 23:18:01 -0800 + cwidget (0.5.12-3ubuntu1) jaunty; urgency=low * Merge from debian unstable, remaining changes: only in patch2: unchanged: --- cwidget-0.5.12.orig/src/cwidget/toplevel.cc +++ cwidget-0.5.12/src/cwidget/toplevel.cc @@ -446,8 +446,13 @@ void operator()() { - threads::mutex::lock l(input_event_mutex); - input_event_fired = false; + // Don't hold the lock for longer than we need to (we lock it + // here to be extra-paranoid about changing the value of + // input_event_fired). + { + threads::mutex::lock l(input_event_mutex); + input_event_fired = false; + } // Important note: this routine only blocks indefinitely in // select() and pthread_cond_wait(), assuming no bugs in @@ -480,6 +485,12 @@ } else { + // Lock the mutex and wait on the condition variable. + // We have to be careful to release the mutex when we + // leave this scope; otherwise we could end up being + // canceled while we hold the mutex, which leads to + // horrible stuff like bug #511708. + threads::mutex::lock l(input_event_mutex); post_event(new get_input_event(input_event_mutex, input_event_fired, input_event_condition));