r35581 - in /desktop/unstable/gnome-games/debian: changelog control patches/91_glchess_engine.patch patches/series
dktrkranz at users.alioth.debian.org
dktrkranz at users.alioth.debian.org
Sun Aug 5 21:37:56 UTC 2012
Author: dktrkranz
Date: Sun Aug 5 21:37:56 2012
New Revision: 35581
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=35581
Log:
* debian/patches/91_glchess_engine.patch:
- Cherry-pick patch from upstream Git to kill gnuchess engine
processes on new game/exit (Closes: #675003).
Added:
desktop/unstable/gnome-games/debian/patches/91_glchess_engine.patch
Modified:
desktop/unstable/gnome-games/debian/changelog
desktop/unstable/gnome-games/debian/control
desktop/unstable/gnome-games/debian/patches/series
Modified: desktop/unstable/gnome-games/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-games/debian/changelog?rev=35581&op=diff
==============================================================================
--- desktop/unstable/gnome-games/debian/changelog [utf-8] (original)
+++ desktop/unstable/gnome-games/debian/changelog [utf-8] Sun Aug 5 21:37:56 2012
@@ -1,3 +1,12 @@
+gnome-games (1:3.4.2-3) unstable; urgency=medium
+
+ * Team upload.
+ * debian/patches/91_glchess_engine.patch:
+ - Cherry-pick patch from upstream Git to kill gnuchess engine
+ processes on new game/exit (Closes: #675003).
+
+ -- Luca Falavigna <dktrkranz at debian.org> Sun, 05 Aug 2012 23:14:54 +0200
+
gnome-games (1:3.4.2-2) unstable; urgency=low
* debian/patches/02_swell-foop-datadir.patch: Install data files into
Modified: desktop/unstable/gnome-games/debian/control
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-games/debian/control?rev=35581&op=diff
==============================================================================
--- desktop/unstable/gnome-games/debian/control [utf-8] (original)
+++ desktop/unstable/gnome-games/debian/control [utf-8] Sun Aug 5 21:37:56 2012
@@ -7,7 +7,7 @@
Section: gnome
Priority: optional
Maintainer: Josselin Mouette <joss at debian.org>
-Uploaders: Debian GNOME Maintainers <pkg-gnome-maintainers at lists.alioth.debian.org>, Emilio Pozuelo Monfort <pochu at debian.org>, Jordi Mallach <jordi at debian.org>, Michael Biebl <biebl at debian.org>
+Uploaders: Debian GNOME Maintainers <pkg-gnome-maintainers at lists.alioth.debian.org>, Jordi Mallach <jordi at debian.org>, Michael Biebl <biebl at debian.org>
Build-Depends: cdbs (>= 0.4.90~),
debhelper (>= 8),
dh-autoreconf,
Added: desktop/unstable/gnome-games/debian/patches/91_glchess_engine.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-games/debian/patches/91_glchess_engine.patch?rev=35581&op=file
==============================================================================
--- desktop/unstable/gnome-games/debian/patches/91_glchess_engine.patch (added)
+++ desktop/unstable/gnome-games/debian/patches/91_glchess_engine.patch [utf-8] Sun Aug 5 21:37:56 2012
@@ -1,0 +1,110 @@
+From 1eb18e95bad9135b516fbf6f77f516fa1ab8b402 Mon Sep 17 00:00:00 2001
+From: Robert Ancell <robert.ancell at canonical.com>
+Date: Sat, 14 Jul 2012 05:13:12 +0000
+Subject: glchess: Kill engine processes on new game/exit
+
+Index: gnome-games-3.4.2/glchess/src/chess-engine.vala
+===================================================================
+--- gnome-games-3.4.2.orig/glchess/src/chess-engine.vala 2012-05-15 06:37:48.000000000 +0200
++++ gnome-games-3.4.2/glchess/src/chess-engine.vala 2012-08-05 23:13:21.586577206 +0200
+@@ -35,9 +35,9 @@
+ try
+ {
+ Process.spawn_async_with_pipes (null, argv, null,
+- SpawnFlags.SEARCH_PATH,
+- null,
+- out pid, out stdin_fd, out stdout_fd, out stderr_fd);
++ SpawnFlags.SEARCH_PATH | SpawnFlags.DO_NOT_REAP_CHILD,
++ null,
++ out pid, out stdin_fd, out stdout_fd, out stderr_fd);
+ }
+ catch (SpawnError e)
+ {
+@@ -45,6 +45,8 @@
+ return false;
+ }
+
++ ChildWatch.add (pid, engine_stopped_cb);
++
+ stdout_channel = new IOChannel.unix_new (stdout_fd);
+ try
+ {
+@@ -60,7 +62,12 @@
+
+ return true;
+ }
+-
++
++ private void engine_stopped_cb (Pid pid, int status)
++ {
++ stopped ();
++ }
++
+ public virtual void start_game ()
+ {
+ }
+@@ -79,8 +86,8 @@
+
+ public void stop ()
+ {
+- // FIXME
+- stopped ();
++ if (pid != 0)
++ Posix.kill (pid, Posix.SIGTERM);
+ }
+
+ private bool read_cb (IOChannel source, IOCondition condition)
+Index: gnome-games-3.4.2/glchess/src/glchess.vala
+===================================================================
+--- gnome-games-3.4.2.orig/glchess/src/glchess.vala 2012-05-15 06:37:48.000000000 +0200
++++ gnome-games-3.4.2/glchess/src/glchess.vala 2012-08-05 23:13:21.586577206 +0200
+@@ -124,6 +124,13 @@
+ settings_changed_cb (settings, "show-3d");
+ }
+
++ protected override void shutdown ()
++ {
++ base.shutdown ();
++ if (opponent_engine != null)
++ opponent_engine.stop ();
++ }
++
+ public void quit_game ()
+ {
+ if (save_duration_timeout != 0)
+@@ -298,7 +305,14 @@
+ black_level = "normal";
+
+ opponent = null;
+- opponent_engine = null;
++ if (opponent_engine != null)
++ {
++ opponent_engine.stop ();
++ opponent_engine.ready_changed.disconnect (engine_ready_cb);
++ opponent_engine.moved.disconnect (engine_move_cb);
++ opponent_engine.stopped.disconnect (engine_stopped_cb);
++ opponent_engine = null;
++ }
+ if (white_engine != null)
+ {
+ opponent = game.white;
+@@ -316,6 +330,7 @@
+ {
+ opponent_engine.ready_changed.connect (engine_ready_cb);
+ opponent_engine.moved.connect (engine_move_cb);
++ opponent_engine.stopped.connect (engine_stopped_cb);
+ opponent_engine.start ();
+ }
+
+@@ -436,6 +451,11 @@
+ opponent.move (move);
+ }
+
++ private void engine_stopped_cb (ChessEngine engine)
++ {
++ opponent.resign ();
++ }
++
+ private void game_start_cb (ChessGame game)
+ {
+ if (opponent_engine != null)
Modified: desktop/unstable/gnome-games/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-games/debian/patches/series?rev=35581&op=diff
==============================================================================
--- desktop/unstable/gnome-games/debian/patches/series [utf-8] (original)
+++ desktop/unstable/gnome-games/debian/patches/series [utf-8] Sun Aug 5 21:37:56 2012
@@ -1,3 +1,4 @@
01_swell-foop-setgid.patch
02_swell-foop-datadir.patch
91_fix-gnuchess6-compatibility.patch
+91_glchess_engine.patch
More information about the pkg-gnome-commits
mailing list