Control: tags -1 patch Hi,
On Mon, Oct 13, 2014 at 07:09:22PM +0200, David Suárez wrote: > During a rebuild of all packages in sid, your package failed to build on > amd64. > > Relevant part (hopefully): > > W: error-package: no-section-field > > W: error-package: no-priority-field > > E: error-package: wrong-file-owner-uid-or-gid etc/ 1000/1000 > > E: error-package: wrong-file-owner-uid-or-gid etc/foo 1000/1000 > > W: error-package: maintainer-script-ignores-errors postinst > > > > - Lintian finished with exit status 0? ^ > > + Lintian finished with exit status 1? ^ This bug seems to be caused by an error in the way gdebi handles the lintian output. The code adds watchers for both stdin and stderr, and adds watchers to get the exit code in the same loop. As this is done twice, there is a race condition between both watchers. It seems one of them doesn't get the exit code and gets 0 instead. If that one runs first, the test fails. By adding the watcher outside the loop that adds the IO watchers, there is only a single watcher, which fixes the build. The attached patch does just that. If there is no objection, I'm happy to do an NMU with this patch. Cheers, Ivo
commit 787ef9dede8a148e0e56201c155057bbf6712886 Author: Ivo De Decker <iv...@debian.org> Date: Sun Nov 9 22:15:44 2014 +0100 add only 1 watcher for the exit status diff --git a/GDebi/GDebiGtk.py b/GDebi/GDebiGtk.py index 5ebaade..78cbdea 100644 --- a/GDebi/GDebiGtk.py +++ b/GDebi/GDebiGtk.py @@ -411,22 +411,22 @@ class GDebiGtk(SimpleGtkbuilderApp, GDebiCommon): cmd = ["/usr/bin/lintian", filename] (pid, stdin, stdout, stderr) = GLib.spawn_async( cmd, flags=GObject.SPAWN_DO_NOT_REAP_CHILD, standard_output=True, standard_error=True) for fd in [stdout, stderr]: channel = GLib.IOChannel(filedes=fd) channel.set_flags(GLib.IOFlags.NONBLOCK) GLib.io_add_watch(channel, GLib.PRIORITY_DEFAULT, GLib.IOCondition.IN | GLib.IO_ERR | GLib.IO_HUP, self._on_lintian_output) - GLib.child_watch_add(GLib.PRIORITY_DEFAULT, pid, - self._on_lintian_finished) + GLib.child_watch_add(GLib.PRIORITY_DEFAULT, pid, + self._on_lintian_finished) def _on_lintian_finished(self, pid, condition): exit_status = os.WEXITSTATUS(condition) self._lintian_exit_status = exit_status if not self._lintian_exit_status_gathered: self._lintian_exit_status_gathered = True text = _("\nLintian finished with exit status %s") % exit_status self._lintian_output += text buf = self.textview_lintian_output.get_buffer() buf.set_text(self._lintian_output)