Dear RM, please consider the attached diff for deluge in Squeeze. The upload would fix #602613 (although the bug isn't easily reproducible on all systems). Code for the fix is a backport from the 1.3.x release made by upstream on explicit request (so the version in unstable isn't affected). The following diffstat also shows other minor changes from upstream 1.2-stable brach which don't affect the package. ChangeLog | 1 + debian/changelog | 8 ++++++++ deluge/ui/gtkui/mainwindow.py | 15 ++++++++++----- deluge/ui/gtkui/menubar.py | 5 +---- deluge/ui/gtkui/systemtray.py | 6 +----- docs/man/deluged.1 | 1 + get_libtorrent.sh | 16 ++++++++++++++++ setup.py | 33 ++++++++++++++++++++++----------- 8 files changed, 60 insertions(+), 25 deletions(-) Thanks, -- Cristian Greco GPG key ID: 0xCF4D32E4
diff -Nru deluge-1.2.3+git20100712.0b609bf/ChangeLog deluge-1.2.3+git20110209.8c36830/ChangeLog
--- deluge-1.2.3+git20100712.0b609bf/ChangeLog 2010-07-12 23:46:04.000000000 +0200
+++ deluge-1.2.3+git20110209.8c36830/ChangeLog 2011-02-09 18:07:32.000000000 +0100
@@ -4,6 +4,7 @@
of string. This fixes a problem where using lt 0.14.10 wouldn't allow
Deluge to start.
* Fix libtorrent 0.15 compatibility
+ * Fix hang on quit
=== Deluge 1.2.2 (19 March 2010) ===
==== Core ====
diff -Nru deluge-1.2.3+git20100712.0b609bf/debian/changelog deluge-1.2.3+git20110209.8c36830/debian/changelog
--- deluge-1.2.3+git20100712.0b609bf/debian/changelog 2010-07-13 19:12:30.000000000 +0200
+++ deluge-1.2.3+git20110209.8c36830/debian/changelog 2011-02-12 13:12:33.000000000 +0100
@@ -1,3 +1,11 @@
+deluge (1.2.3+git20110209.8c36830-0squeeze1) stable; urgency=low
+
+ * Imported Upstream version 1.2.3+git20110209.8c36830
+ - Upstream commit 8c36830 backported from the 1.3.x release:
+ "fix hang on quit". (Closes: #602613)
+
+ -- Cristian Greco <cristian@regolo.cc> Sat, 12 Feb 2011 13:00:41 +0100
+
deluge (1.2.3+git20100712.0b609bf-1) unstable; urgency=low
* Imported Upstream version 1.2.3+git20100712.0b609bf
diff -Nru deluge-1.2.3+git20100712.0b609bf/deluge/ui/gtkui/mainwindow.py deluge-1.2.3+git20110209.8c36830/deluge/ui/gtkui/mainwindow.py
--- deluge-1.2.3+git20100712.0b609bf/deluge/ui/gtkui/mainwindow.py 2010-07-12 23:46:04.000000000 +0200
+++ deluge-1.2.3+git20110209.8c36830/deluge/ui/gtkui/mainwindow.py 2011-02-09 18:07:32.000000000 +0100
@@ -152,11 +152,16 @@
"""Returns a reference to the main window glade object."""
return self.main_glade
- def quit(self):
- if client.is_classicmode():
- gtk.main_quit()
- else:
- reactor.stop()
+ def quit(self, shutdown=False):
+ """
+ Quits the GtkUI
+
+ :param shutdown: whether or not to shutdown the daemon as well
+ :type shutdown: boolean
+ """
+ if shutdown:
+ client.daemon.shutdown()
+ reactor.stop()
def load_window_state(self):
x = self.config["window_x_pos"]
diff -Nru deluge-1.2.3+git20100712.0b609bf/deluge/ui/gtkui/menubar.py deluge-1.2.3+git20110209.8c36830/deluge/ui/gtkui/menubar.py
--- deluge-1.2.3+git20100712.0b609bf/deluge/ui/gtkui/menubar.py 2010-07-12 23:46:04.000000000 +0200
+++ deluge-1.2.3+git20110209.8c36830/deluge/ui/gtkui/menubar.py 2011-02-09 18:07:32.000000000 +0100
@@ -253,10 +253,7 @@
def on_menuitem_quitdaemon_activate(self, data=None):
log.debug("on_menuitem_quitdaemon_activate")
- # Tell the core to shutdown
- def on_shutdown(result):
- self.window.quit()
- client.daemon.shutdown().addCallback(on_shutdown)
+ self.window.quit(shutdown=True)
def on_menuitem_quit_activate(self, data=None):
log.debug("on_menuitem_quit_activate")
diff -Nru deluge-1.2.3+git20100712.0b609bf/deluge/ui/gtkui/systemtray.py deluge-1.2.3+git20110209.8c36830/deluge/ui/gtkui/systemtray.py
--- deluge-1.2.3+git20100712.0b609bf/deluge/ui/gtkui/systemtray.py 2010-07-12 23:46:04.000000000 +0200
+++ deluge-1.2.3+git20110209.8c36830/deluge/ui/gtkui/systemtray.py 2011-02-09 18:07:32.000000000 +0100
@@ -324,9 +324,6 @@
if self.config["lock_tray"] and not self.window.visible():
self.unlock_tray()
- if self.config["classic_mode"]:
- client.daemon.shutdown()
-
self.window.quit()
def on_menuitem_quitdaemon_activate(self, menuitem):
@@ -334,8 +331,7 @@
if self.config["lock_tray"] and not self.window.visible():
self.unlock_tray()
- client.daemon.shutdown()
- self.window.quit()
+ self.window.quit(shutdown=True)
def tray_setbwdown(self, widget, data=None):
self.setbwlimit(widget, _("Set Maximum Download Speed"), "max_download_speed",
diff -Nru deluge-1.2.3+git20100712.0b609bf/docs/man/deluged.1 deluge-1.2.3+git20110209.8c36830/docs/man/deluged.1
--- deluge-1.2.3+git20100712.0b609bf/docs/man/deluged.1 2010-07-12 23:46:04.000000000 +0200
+++ deluge-1.2.3+git20110209.8c36830/docs/man/deluged.1 2011-02-09 18:07:32.000000000 +0100
@@ -27,6 +27,7 @@
.TP
.I -i INTERFACE, --interface=INTERFACE
Interface daemon will listen for bittorrent connections on, this should be an IP address
+.TP
.I -u UI_INTERFACE, --ui-interface=UI_INTERFACE
Interface daemon will listen for UI connections on, this should be an IP address
.TP
diff -Nru deluge-1.2.3+git20100712.0b609bf/get_libtorrent.sh deluge-1.2.3+git20110209.8c36830/get_libtorrent.sh
--- deluge-1.2.3+git20100712.0b609bf/get_libtorrent.sh 1970-01-01 01:00:00.000000000 +0100
+++ deluge-1.2.3+git20110209.8c36830/get_libtorrent.sh 2011-02-09 18:07:32.000000000 +0100
@@ -0,0 +1,16 @@
+#!/bin/bash
+#
+# This script checks out libtorrent from subversion
+#
+
+SVN=$(which svn)
+LT_URL=https://libtorrent.svn.sourceforge.net/svnroot/libtorrent
+VERSION=14
+[ "$1" != "" ] && VERSION=$1
+BRANCH=branches/RC_0_$VERSION
+
+if [ -d libtorrent ]; then
+ $SVN up libtorrent
+else
+ $SVN co $LT_URL/$BRANCH libtorrent
+fi
diff -Nru deluge-1.2.3+git20100712.0b609bf/setup.py deluge-1.2.3+git20110209.8c36830/setup.py
--- deluge-1.2.3+git20100712.0b609bf/setup.py 2010-07-12 23:46:04.000000000 +0200
+++ deluge-1.2.3+git20110209.8c36830/setup.py 2011-02-09 18:07:32.000000000 +0100
@@ -211,18 +211,29 @@
else:
build_libtorrent = False
-if build_libtorrent and os.path.exists("libtorrent") and os.listdir("libtorrent"):
- # There isn't a system libtorrent library, so let's build the one included with deluge
- libtorrent = Extension(
- 'libtorrent',
- extra_compile_args = _extra_compile_args,
- include_dirs = _include_dirs,
- libraries = _libraries,
- library_dirs = _library_dirs,
- sources = _sources
- )
+if build_libtorrent:
+ got_libtorrent = False
+ if not os.path.exists("libtorrent"):
+ import subprocess
+ if subprocess.call(['./get_libtorrent.sh']) > 0:
+ got_libtorrent = False
+ else:
+ got_libtorrent = True
+ else:
+ got_libtorrent = True
- _ext_modules = [libtorrent]
+ if got_libtorrent:
+ # There isn't a system libtorrent library, so let's build the one included with deluge
+ libtorrent = Extension(
+ 'libtorrent',
+ extra_compile_args = _extra_compile_args,
+ include_dirs = _include_dirs,
+ libraries = _libraries,
+ library_dirs = _library_dirs,
+ sources = _sources
+ )
+
+ _ext_modules = [libtorrent]
class build_trans(cmd.Command):
description = 'Compile .po files into .mo files'
Attachment:
signature.asc
Description: PGP signature