Merge lp:~roadmr/ubuntu/oneiric/checkbox/0.12.8.1 into lp:ubuntu/oneiric/checkbox

Proposed by Daniel Manrique
Status: Needs review
Proposed branch: lp:~roadmr/ubuntu/oneiric/checkbox/0.12.8.1
Merge into: lp:ubuntu/oneiric/checkbox
Diff against target: 279 lines (+82/-54)
10 files modified
checkbox/contrib/persist.py (+5/-4)
checkbox/lib/safe.py (+5/-0)
checkbox/message.py (+4/-3)
checkbox_gtk/gtk_interface.py (+2/-4)
debian/changelog (+20/-0)
gtk/checkbox-gtk.ui (+37/-37)
jobs/input.txt.in (+1/-1)
plugins/persist_info.py (+2/-1)
scripts/connect_wireless (+1/-1)
scripts/usb_test (+5/-3)
To merge this branch: bzr merge lp:~roadmr/ubuntu/oneiric/checkbox/0.12.8.1
Reviewer Review Type Date Requested Status
Luke Yelavich Approve
Review via email: mp+84660@code.launchpad.net

Description of the change

This merge contains some bug fixes we'd like to have on an SRU for Checkbox on Ubuntu 11.10. SRU criteria are presented in each bug's description.

Thanks!

To post a comment you must log in.
Revision history for this message
Luke Yelavich (themuso) wrote :

Thanks for your work. For future reference, please make sure the upload target is set to $dist-proposed for stable release updates, where $dist is oneiric, precise, etc. I'd also ask that you not tag your branches. It is usually up to the uploader to tag a branch, since they may need to make further changes before the upload, and it keeps the work of each upload a little more tidy if the final commit of that upload is tagged. In this case its not a problem, but its something thats worth thinking about in the future.

Thanks again.

review: Approve
Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Luke,

Thanks so much for your advice, I'll be sure to follow it in the future. It's only the second SRU I request so I'm still a bit wobbly but I'll improve. Also thanks for reviewing our changes!

Unmerged revisions

36. By Daniel Manrique

 * Ensure that connect_wireless chooses a wireless connection from the list
   of available connections (LP: #877752)
 * Have the bluetooth/detect tests require a device with the category
   BLUETOOTH to run, thus preventing the test from failing on systems with
   no Bluetooth device (LP: #862322)
 * Guard against trying to write files to logical partitions on USB sticks
   (which will obviously fail) in usb_test (LP: #887049)
 * Allow input/mouse test to run if a TOUCH device is present
   (LP: #886129)
 * Flush file descriptors and sync disk before running a test (LP: #814801)
* Move progress indicator to main checkbox dialog instead of a
  transient window (LP: #868995)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'checkbox/contrib/persist.py'
2--- checkbox/contrib/persist.py 2011-02-14 18:19:27 +0000
3+++ checkbox/contrib/persist.py 2011-12-06 19:34:35 +0000
4@@ -23,6 +23,7 @@
5 import re
6 import posixpath
7
8+from checkbox.lib.safe import safe_close
9
10 __all__ = ["Persist", "MemoryBackend", "PickleBackend", "BPickleBackend",
11 "path_string_to_tuple", "path_tuple_to_string", "RootedPersist",
12@@ -517,14 +518,14 @@
13 try:
14 return self._pickle.load(file)
15 finally:
16- file.close()
17+ safe_close(file)
18
19 def save(self, filepath, map):
20 file = open(filepath, "w")
21 try:
22 self._pickle.dump(map, file, 2)
23 finally:
24- file.close()
25+ safe_close(file)
26
27
28 class BPickleBackend(Backend):
29@@ -538,11 +539,11 @@
30 try:
31 return self._bpickle.loads(file.read())
32 finally:
33- file.close()
34+ safe_close(file)
35
36 def save(self, filepath, map):
37 file = open(filepath, "w")
38 try:
39 file.write(self._bpickle.dumps(map))
40 finally:
41- file.close()
42+ safe_close(file)
43
44=== modified file 'checkbox/lib/safe.py'
45--- checkbox/lib/safe.py 2009-03-17 09:46:16 +0000
46+++ checkbox/lib/safe.py 2011-12-06 19:34:35 +0000
47@@ -94,3 +94,8 @@
48 md5sum = digest.hexdigest()
49
50 return md5sum
51+
52+def safe_close(file):
53+ file.flush()
54+ os.fsync(file.fileno())
55+ file.close()
56
57=== modified file 'checkbox/message.py'
58--- checkbox/message.py 2010-03-09 16:58:36 +0000
59+++ checkbox/message.py 2011-12-06 19:34:35 +0000
60@@ -22,7 +22,7 @@
61 import posixpath
62
63 from checkbox.contrib import bpickle
64-
65+from checkbox.lib.safe import safe_close
66
67 HELD = "h"
68 BROKEN = "b"
69@@ -215,7 +215,7 @@
70 try:
71 return file.read()
72 finally:
73- file.close()
74+ safe_close(file)
75
76 def _get_flags(self, path):
77 basename = posixpath.basename(path)
78@@ -253,7 +253,8 @@
79
80 file = open(filename + ".tmp", "w")
81 file.write(message_data)
82- file.close()
83+ safe_close(file)
84+
85 os.rename(filename + ".tmp", filename)
86
87 # For now we use the inode as the message id, as it will work
88
89=== modified file 'checkbox_gtk/gtk_interface.py'
90--- checkbox_gtk/gtk_interface.py 2011-09-29 13:12:01 +0000
91+++ checkbox_gtk/gtk_interface.py 2011-12-06 19:34:35 +0000
92@@ -102,10 +102,8 @@
93 image_head.connect("expose-event",self.draw_image_head)
94
95 # Set wait transient for dialog
96- self._wait = self._get_widget("window_wait")
97- self._wait.set_transient_for(self._dialog)
98- self._wait.realize()
99- self._wait.get_window().set_functions(Gdk.WMFunction.MOVE)
100+ self._wait = self._get_widget("box_wait")
101+ self._wait.hide()
102
103 # Set shorthand for notebook
104 self._notebook = self._get_widget("notebook_main")
105
106=== modified file 'debian/changelog'
107--- debian/changelog 2011-09-29 13:12:01 +0000
108+++ debian/changelog 2011-12-06 19:34:35 +0000
109@@ -1,3 +1,23 @@
110+checkbox (0.12.9) oneiric; urgency=low
111+
112+ [Brendan Donegan]
113+ * Ensure that connect_wireless chooses a wireless connection from the list
114+ of available connections (LP: #877752)
115+ * Have the bluetooth/detect tests require a device with the category
116+ BLUETOOTH to run, thus preventing the test from failing on systems with
117+ no Bluetooth device (LP: #862322)
118+ * Guard against trying to write files to logical partitions on USB sticks
119+ (which will obviously fail) in usb_test (LP: #887049)
120+ * Allow input/mouse test to run if a TOUCH device is present
121+ (LP: #886129)
122+ * Flush file descriptors and sync disk before running a test (LP: #814801)
123+
124+ [Daniel Manrique]
125+ * Move progress indicator to main checkbox dialog instead of a
126+ transient window (LP: #868995)
127+
128+ -- Daniel Manrique <daniel.manrique@canonical.com> Fri, 02 Dec 2011 16:49:05 -0500
129+
130 checkbox (0.12.8) oneiric; urgency=low
131
132 New upstream release (LP: #862579):
133
134=== modified file 'gtk/checkbox-gtk.ui'
135--- gtk/checkbox-gtk.ui 2011-06-13 14:22:39 +0000
136+++ gtk/checkbox-gtk.ui 2011-12-06 19:34:35 +0000
137@@ -374,6 +374,43 @@
138 <property name="position">2</property>
139 </packing>
140 </child>
141+ <child>
142+ <object class="GtkBox" id="box_wait">
143+ <property name="visible">True</property>
144+ <property name="can_focus">False</property>
145+ <property name="orientation">vertical</property>
146+ <child>
147+ <object class="GtkLabel" id="label_wait">
148+ <property name="visible">True</property>
149+ <property name="can_focus">False</property>
150+ </object>
151+ <packing>
152+ <property name="expand">False</property>
153+ <property name="fill">False</property>
154+ <property name="position">0</property>
155+ </packing>
156+ </child>
157+ <child>
158+ <object class="GtkProgressBar" id="progressbar_wait">
159+ <property name="visible">True</property>
160+ <property name="can_focus">False</property>
161+ <property name="pulse_step">0.10000000149</property>
162+ </object>
163+ <packing>
164+ <property name="expand">False</property>
165+ <property name="fill">False</property>
166+ <property name="position">1</property>
167+ </packing>
168+ </child>
169+ </object>
170+ <packing>
171+ <property name="expand">False</property>
172+ <property name="fill">True</property>
173+ <property name="position">3</property>
174+ </packing>
175+ </child>
176+
177+
178 <child internal-child="action_area">
179 <object class="GtkHButtonBox" id="dialog-action_area">
180 <property name="visible">True</property>
181@@ -452,41 +489,4 @@
182 <action-widget response="1">button_next</action-widget>
183 </action-widgets>
184 </object>
185- <object class="GtkWindow" id="window_wait">
186- <property name="title" translatable="yes"></property>
187- <property name="border_width">6</property>
188- <property name="resizable">False</property>
189- <property name="modal">True</property>
190- <property name="window_position">center-on-parent</property>
191- <property name="type_hint">dialog</property>
192- <property name="skip_taskbar_hint">True</property>
193- <property name="skip_pager_hint">True</property>
194- <child>
195- <object class="GtkVBox" id="vbox_wait">
196- <property name="visible">True</property>
197- <property name="spacing">12</property>
198- <child>
199- <object class="GtkLabel" id="label_wait">
200- <property name="visible">True</property>
201- </object>
202- <packing>
203- <property name="expand">False</property>
204- <property name="fill">False</property>
205- <property name="position">0</property>
206- </packing>
207- </child>
208- <child>
209- <object class="GtkProgressBar" id="progressbar_wait">
210- <property name="visible">True</property>
211- <property name="pulse_step">0.10000000149</property>
212- </object>
213- <packing>
214- <property name="expand">False</property>
215- <property name="fill">False</property>
216- <property name="position">1</property>
217- </packing>
218- </child>
219- </object>
220- </child>
221- </object>
222 </interface>
223
224=== modified file 'jobs/input.txt.in'
225--- jobs/input.txt.in 2011-08-10 21:09:56 +0000
226+++ jobs/input.txt.in 2011-12-06 19:34:35 +0000
227@@ -1,6 +1,6 @@
228 plugin: manual
229 name: input/mouse
230-requires: device.category == 'MOUSE'
231+requires: device.category == 'MOUSE' or device.category == 'TOUCH'
232 _description:
233 Moving the mouse should move the cursor on the screen.
234 .
235
236=== modified file 'plugins/persist_info.py'
237--- plugins/persist_info.py 2011-02-14 18:19:27 +0000
238+++ plugins/persist_info.py 2011-12-06 19:34:35 +0000
239@@ -35,7 +35,8 @@
240 for (rt, rh) in [
241 ("begin", self.begin),
242 ("prompt-begin", self.begin),
243- ("prompt-job", self.save)]:
244+ ("prompt-job", self.save),
245+ ("report-job", self.save)]:
246 self._manager.reactor.call_on(rt, rh, -100)
247
248 # Save persist data last
249
250=== modified file 'scripts/connect_wireless'
251--- scripts/connect_wireless 2011-09-29 13:12:01 +0000
252+++ scripts/connect_wireless 2011-12-06 19:34:35 +0000
253@@ -8,7 +8,7 @@
254 if [ $? -eq 0 ]
255 then
256 ap=$(echo $active_connection | awk -F\' '{print $2}')
257- conn=$(nmcli -t -f UUID,NAME con list | grep -e "$ap$" | awk -F\: '{print $1}')
258+ conn=$(nmcli -t -f UUID,NAME,TYPE con list | grep wireless | grep -e "$ap$" | awk -F\: '{print $1}')
259 else
260 conn=$(nmcli -t -f UUID,TYPE con list | grep wireless | head -n 1 | awk -F\: '{print $1}')
261 fi
262
263=== modified file 'scripts/usb_test'
264--- scripts/usb_test 2011-09-29 13:12:01 +0000
265+++ scripts/usb_test 2011-12-06 19:34:35 +0000
266@@ -68,9 +68,11 @@
267 if not device_props.Get('org.freedesktop.UDisks.Device',"DeviceIsDrive"):
268 if device_props.Get('org.freedesktop.UDisks.Device', "DriveConnectionInterface") == 'usb':
269 devFile = str(device_props.Get('org.freedesktop.UDisks.Device',"DeviceFile"))
270- print str(device_props.Get('org.freedesktop.UDisks.Device',"DeviceMountPaths"))
271- devPath = str(device_props.Get('org.freedesktop.UDisks.Device',"DeviceMountPaths")[0])
272- disks[devFile] = devPath
273+
274+ if len(device_props.Get('org.freedesktop.UDisks.Device',"DeviceMountPaths")) > 0:
275+ print str(device_props.Get('org.freedesktop.UDisks.Device',"DeviceMountPaths"))
276+ devPath = str(device_props.Get('org.freedesktop.UDisks.Device',"DeviceMountPaths")[0])
277+ disks[devFile] = devPath
278
279 return disks
280

Subscribers

People subscribed via source and target branches