Merge lp:~rohangarg/usb-creator/fix-for-1315866 into lp:usb-creator

Proposed by Rohan Garg
Status: Merged
Approved by: Evan
Approved revision: 441
Merged at revision: 439
Proposed branch: lp:~rohangarg/usb-creator/fix-for-1315866
Merge into: lp:usb-creator
Diff against target: 45 lines (+20/-0)
2 files modified
bin/usb-creator-kde (+11/-0)
debian/changelog (+9/-0)
To merge this branch: bzr merge lp:~rohangarg/usb-creator/fix-for-1315866
Reviewer Review Type Date Requested Status
Evan (community) Approve
Michał Zając (community) Approve
Review via email: mp+218220@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Michał Zając (quintasan) wrote :

It fixes the issue for me.

review: Approve
440. By Rohan Garg

Changelog++

Revision history for this message
Evan (ev) wrote :

Can you explain in a comment in the code exactly why this is
necessary? Please convince me this isn't a hack.

Revision history for this message
Rohan Garg (rohangarg) wrote :

Well, it's more of a workaround at the moment while upstream is sorting out this bug, see [1]. I've cleared a similar patch for other PyQt4 projects with upstream, see [2]

[1] http://www.riverbankcomputing.com/pipermail/pyqt/2014-March/033957.html
[2] http://www.riverbankcomputing.com/pipermail/pyqt/2014-April/034016.html

Revision history for this message
Evan (ev) wrote :

Sure, but we need to know why it's there and when it's truly safe to
remove. Can you please reference that discussion in a comment in the
code?

441. By Rohan Garg

Add more info regarding the workaround in the comments

Revision history for this message
Rohan Garg (rohangarg) wrote :

Bump?

Revision history for this message
Evan (ev) wrote :

Ah, thanks for re-raising this. I didn't see that you committed a more detailed explanation.

Merging now.

review: Approve
Revision history for this message
Rohan Garg (rohangarg) wrote :

Cheerio :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/usb-creator-kde'
--- bin/usb-creator-kde 2013-01-28 13:24:55 +0000
+++ bin/usb-creator-kde 2014-05-06 13:10:51 +0000
@@ -18,6 +18,8 @@
18import sys18import sys
19import logging19import logging
2020
21import sip
22
21from dbus import DBusException23from dbus import DBusException
2224
23from PyQt4 import uic25from PyQt4 import uic
@@ -42,6 +44,15 @@
42 setup_logging()44 setup_logging()
43 setup_gettext()45 setup_gettext()
4446
47 #FIXME: Workaround for LP: 1315866
48 # This happens due to the fact that when a Python dict is garbage
49 # collected the order in which the individual items in the dict are
50 # garbage collected is unpredictable, causing the dtor's to be called
51 # after python exits. In order to work around the issue, upstream
52 # suggested that projects disable the automatic destruction of C++
53 # instances and C structures
54 # Ref: http://www.riverbankcomputing.com/pipermail/pyqt/2014-March/033929.html
55 sip.setdestroyonexit(False)
45 # Add cmdline options56 # Add cmdline options
46 options = KCmdLineOptions()57 options = KCmdLineOptions()
47 options.add("i").add("iso <img>", ki18n("provide a source image (CD or raw disk) to pre-populate the UI."))58 options.add("i").add("iso <img>", ki18n("provide a source image (CD or raw disk) to pre-populate the UI."))
4859
=== modified file 'debian/changelog'
--- debian/changelog 2014-04-01 14:04:42 +0000
+++ debian/changelog 2014-05-06 13:10:51 +0000
@@ -1,3 +1,12 @@
1usb-creator (0.2.57) UNRELEASED; urgency=medium
2
3 * Workaround Python Qt4 being sucky (LP: #1315866)
4 - Known bug in Python Qt4 trying to delete objects twice, workaround by
5 telling SIP to not call dtors on each object, and instead throwing away
6 everything at the end
7
8 -- Rohan Garg <rohangarg@kubuntu.org> Mon, 05 May 2014 12:04:00 +0200
9
1usb-creator (0.2.56) trusty; urgency=medium10usb-creator (0.2.56) trusty; urgency=medium
211
3 [ Ivan Larionov ]12 [ Ivan Larionov ]

Subscribers

People subscribed via source and target branches