Package: bittornado
Version: 0.3.18-10
Severity: important
Tags: patch sid jessie
User: [email protected]
Usertags: wxpy3.0
Control: block 755757 by -1
We're aiming to migrate the archive to using wxpython3.0 instead of
wxwidgets2.8, and hope to drop wxwidgets2.8 before jessie is released.
I've rebuilt bittornado with the attached patch, and tested the GUIs
with wxPython 3.0, and everything seems to work except that
btcompletedirgui fails when I click "make" with this error:
**
Pango:ERROR:/build/pango1.0-0SLRUp/pango1.0-1.36.3/./pango/pango-layout.c:3916:pango_layout_check_lines:
assertion failed: (!layout->log_attrs)
Aborted
However, testing the current package in unstable with wxPython 2.8, I
get the same error, so this isn't new breakage from my updates.
I'm happy to NMU these changes.
Cheers,
Olly
diff -Nru bittornado-0.3.18/debian/changelog bittornado-0.3.18/debian/changelog
--- bittornado-0.3.18/debian/changelog 2010-03-22 10:36:58.000000000 +1300
+++ bittornado-0.3.18/debian/changelog 2014-08-08 16:34:20.000000000 +1200
@@ -1,3 +1,11 @@
+bittornado (0.3.18-10.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Update to use python-wxgtk3.0:
+ + New patch: 32_wxpy3.0-compat.patch
+
+ -- Olly Betts <[email protected]> Fri, 08 Aug 2014 16:34:07 +1200
+
bittornado (0.3.18-10) unstable; urgency=low
* New patch from upstream's CVS to allow torrents that only have an
diff -Nru bittornado-0.3.18/debian/control bittornado-0.3.18/debian/control
--- bittornado-0.3.18/debian/control 2010-03-22 10:16:54.000000000 +1300
+++ bittornado-0.3.18/debian/control 2014-08-08 15:38:27.000000000 +1200
@@ -40,7 +40,7 @@
Package: bittornado-gui
Architecture: all
-Depends: ${misc:Depends}, ${python:Depends}, bittornado (= ${source:Version}), python-wxgtk2.6 | python-wxgtk2.8
+Depends: ${misc:Depends}, ${python:Depends}, bittornado (= ${source:Version}), python-wxgtk3.0
Conflicts: bittorrent (<= 3.4.2-2), libfreetype6 (= 2.1.7-2.4)
Replaces: bittorrent
Suggests: python-psyco
diff -Nru bittornado-0.3.18/debian/patches/32_wxpy3.0-compat.patch bittornado-0.3.18/debian/patches/32_wxpy3.0-compat.patch
--- bittornado-0.3.18/debian/patches/32_wxpy3.0-compat.patch 1970-01-01 12:00:00.000000000 +1200
+++ bittornado-0.3.18/debian/patches/32_wxpy3.0-compat.patch 2014-08-08 16:47:04.000000000 +1200
@@ -0,0 +1,185 @@
+Description: Make compatible with wxPython 3.0
+Author: Olly Betts <[email protected]>
+Forwarded: no
+Last-Update: 2014-08-08
+
+--- a/bt-t-make.py
++++ b/bt-t-make.py
+@@ -66,7 +66,7 @@
+ self.switchlock = Lock()
+ self.working = False
+ self.queue = []
+- wx.InitAllImageHandlers()
++ # no-op in 3.0: wx.InitAllImageHandlers()
+ self.thostselection = self.calls['getCurrentTHost']()
+ self.thostselectnum = 0
+ self.choices = None
+@@ -166,7 +166,7 @@
+
+ def selectfile(self, x = None):
+ self.calls['dropTargetHovered']()
+- dl = wx.FileDialog (self.frame, 'Choose file to use', '', '', '', wx.OPEN)
++ dl = wx.FileDialog (self.frame, 'Choose file to use', '', '', '', wx.FD_OPEN)
+ if dl.ShowModal() == wx.ID_OK:
+ self.calls['dropTargetDropped']()
+ self.complete(dl.GetPath())
+@@ -319,7 +319,7 @@
+ self.switchlock = Lock()
+ self.working = False
+ self.queue = []
+- wx.InitAllImageHandlers()
++ # no-op in 3.0: wx.InitAllImageHandlers()
+ self.thostselection = self.calls['getCurrentTHost']()
+ self.thostselectnum = 0
+ self.choices = None
+@@ -560,7 +560,7 @@
+
+ def selectfile(self, x = None):
+ self.calls['dropTargetHovered']()
+- dl = wx.FileDialog (self.frame, 'Choose file to use', '', '', '', wx.OPEN)
++ dl = wx.FileDialog (self.frame, 'Choose file to use', '', '', '', wx.FD_OPEN)
+ if dl.ShowModal() == wx.ID_OK:
+ self.dirCtl.SetValue(dl.GetPath())
+ self.calls['dropTargetDropped']()
+@@ -573,7 +573,7 @@
+ self.complete(f)
+
+ def announcecopy(self, x):
+- dl = wx.FileDialog (self.frame, 'Choose .torrent file to use', '', '', '*.torrent', wx.OPEN)
++ dl = wx.FileDialog (self.frame, 'Choose .torrent file to use', '', '', '*.torrent', wx.FD_OPEN)
+ if dl.ShowModal() == wx.ID_OK:
+ self._announcecopy(dl.GetPath(), True)
+
+@@ -686,7 +686,7 @@
+ def selectDropTarget(self, x):
+ dl = wx.FileDialog (self.frame, 'Choose image to use', join(basepath,'targets'),
+ join(join(basepath,'targets'), self.config['target']),
+- 'Supported images (*.bmp,*.gif)|*.*', wx.OPEN|wx.HIDE_READONLY)
++ 'Supported images (*.bmp,*.gif)|*.*', wx.FD_OPEN|wx.HIDE_READONLY)
+ if dl.ShowModal() == wx.ID_OK:
+ try:
+ self.calls['changeDropTarget'](dl.GetPath())
+@@ -803,7 +803,7 @@
+ d = '.thost'
+ dl = wx.FileDialog (self.frame, 'Save tracker data as',
+ join(basepath,'thosts'), d, '*.thost',
+- wx.SAVE|wx.OVERWRITE_PROMPT)
++ wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)
+ if dl.ShowModal() != wx.ID_OK:
+ return
+ d = dl.GetPath()
+--- a/btdownloadgui.py
++++ b/btdownloadgui.py
+@@ -167,7 +167,7 @@
+ self.invokeLaterEvent = InvokeEvent()
+ self.invokeLaterList = []
+
+- wx.InitAllImageHandlers()
++ # no-op in 3.0: wx.InitAllImageHandlers()
+ self.basepath = self.configfile.getIconDir()
+ self.icon = wx.Icon(os.path.join(self.basepath,'icon_bt.ico'), wx.BITMAP_TYPE_ICO)
+ self.finicon = wx.Icon(os.path.join(self.basepath,'icon_done.ico'), wx.BITMAP_TYPE_ICO)
+@@ -910,8 +910,11 @@
+ fileList.InsertColumn(1, "", format=wx.LIST_FORMAT_RIGHT, width=55)
+ fileList.InsertColumn(2, "")
+
++ item_id = 0
+ for i in range(len(info['files'])):
+ x = wx.ListItem()
++ x.SetId(item_id)
++ item_id += 1
+ fileList.InsertItem(x)
+
+ x = 0
+@@ -961,12 +964,16 @@
+ trackerList.InsertColumn(1, "announce urls")
+
+ for tier in range(len(announce_list)):
++ item_id = 0
+ for t in range(len(announce_list[tier])):
+ i = wx.ListItem()
++ i.SetId(item_id)
++ item_id += 1
+ trackerList.InsertItem(i)
+ if announce is not None:
+ for l in [1,2]:
+ i = wx.ListItem()
++ i.SetId(l)
+ trackerList.InsertItem(i)
+
+ x = 0
+@@ -1010,7 +1017,6 @@
+
+ okButton = wx.Button(panel, -1, 'Ok')
+ colSizer.Add(okButton, 0, wx.ALIGN_RIGHT)
+- colSizer.AddGrowableCol(0)
+
+ if not self.configfileargs['gui_stretchwindow']:
+ aboutTitle.SetSize((400,-1))
+@@ -1369,7 +1375,8 @@
+ self.downrateSpinner = wx.SpinCtrl (panel, -1, "", (-1,-1), (50, -1))
+ self.downrateSpinner.SetFont(self.default_font)
+ self.downrateSpinner.SetRange(0,5000)
+- self.downrateSpinner.SetValue(self.config['max_download_rate'])
++ if self._try_get_config():
++ self.downrateSpinner.SetValue(self.config['max_download_rate'])
+ spinnerSizer.Add (self.downrateSpinner, 0)
+ wx.EVT_SPINCTRL(self.downrateSpinner, -1, self.onDownRateSpinner)
+ spinnerSizer.Add(StaticText(' (0 = unlimited) '),0,wx.ALIGN_CENTER_VERTICAL)
+@@ -1741,6 +1748,7 @@
+ kickbanlen = 0
+ for x in range(spewlen-spewList.GetItemCount()):
+ i = wx.ListItem()
++ i.SetId(x)
+ spewList.InsertItem(i)
+ for x in range(spewlen,spewList.GetItemCount()):
+ spewList.DeleteItem(len(spew)+1)
+@@ -1998,7 +2006,7 @@
+ dl = wx.FileDialog(self.frame,
+ 'Choose file to save as, pick a partial download to resume',
+ defaultDir = start_dir, defaultFile = default, wildcard = '*',
+- style = wx.SAVE)
++ style = wx.FD_SAVE)
+
+ if dl.ShowModal() != wx.ID_OK:
+ f.set()
+@@ -2191,7 +2199,7 @@
+ if len(self.params) == 0:
+ b = wx.FileDialog (d.frame, 'Choose .torrent file to use',
+ defaultDir = '', defaultFile = '', wildcard = '*.torrent',
+- style = wx.OPEN)
++ style = wx.FD_OPEN)
+
+ if b.ShowModal() == wx.ID_OK:
+ self.params.append (b.GetPath())
+--- a/btmaketorrentgui.py
++++ b/btmaketorrentgui.py
+@@ -139,7 +139,7 @@
+ self.dirCtl.SetValue(dl.GetPath())
+
+ def selectfile(self, x):
+- dl = wx.FileDialog (self.frame, 'Choose file or directory to use', style = wx.OPEN)
++ dl = wx.FileDialog (self.frame, 'Choose file or directory to use', style = wx.FD_OPEN)
+ if dl.ShowModal() == wx.ID_OK:
+ self.dirCtl.SetValue(dl.GetPath())
+
+@@ -150,7 +150,7 @@
+ self.dirCtl.SetValue(x[0])
+
+ def announcecopy(self, x):
+- dl = wx.FileDialog (self.frame, 'Choose .torrent file to use', '', '', '*.torrent', wx.OPEN)
++ dl = wx.FileDialog (self.frame, 'Choose .torrent file to use', '', '', '*.torrent', wx.FD_OPEN)
+ if dl.ShowModal() == wx.ID_OK:
+ try:
+ h = open(dl.GetPath(), 'rb')
+--- a/btcompletedirgui.py
++++ b/btcompletedirgui.py
+@@ -51,7 +51,7 @@
+
+ panel = wx.Panel(frame, -1)
+
+- gridSizer = wx.FlexGridSizer(cols = 2, rows = 2, vgap = 15, hgap = 8)
++ gridSizer = wx.FlexGridSizer(cols = 2, vgap = 15, hgap = 8)
+
+ gridSizer.Add(wx.StaticText(panel, -1, 'directory to build:'))
+ self.dirCtl = wx.TextCtrl(panel, -1, '')
diff -Nru bittornado-0.3.18/debian/patches/series bittornado-0.3.18/debian/patches/series
--- bittornado-0.3.18/debian/patches/series 2010-03-22 09:04:55.000000000 +1300
+++ bittornado-0.3.18/debian/patches/series 2014-08-08 16:34:03.000000000 +1200
@@ -27,3 +27,4 @@
29_fix_urandom_error.dpatch
30_announce_list_only_torrents.dpatch
31_fix_for_compact_reqd_off.dpatch
+32_wxpy3.0-compat.patch