Merge lp:~altair-ibn-la-ahad/ubuntu/trusty/ubuntu-release-upgrader/fix-for-1313012 into lp:ubuntu/trusty/ubuntu-release-upgrader

Proposed by Andreas Altaïr Redmer
Status: Work in progress
Proposed branch: lp:~altair-ibn-la-ahad/ubuntu/trusty/ubuntu-release-upgrader/fix-for-1313012
Merge into: lp:ubuntu/trusty/ubuntu-release-upgrader
Diff against target: 34 lines (+14/-0)
2 files modified
check-new-release-gtk (+7/-0)
debian/changelog (+7/-0)
To merge this branch: bzr merge lp:~altair-ibn-la-ahad/ubuntu/trusty/ubuntu-release-upgrader/fix-for-1313012
Reviewer Review Type Date Requested Status
Dmitry Shachnev Needs Resubmitting
Ubuntu branches Pending
Review via email: mp+218177@code.launchpad.net

Description of the change

fixes LP: #1313012

To post a comment you must log in.
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Thanks for your work.

- Please submit fixes against lp:ubuntu-release-upgrader, not against UDD branch. I am rejecting this one.
- (LP:# 1313012) is wrong syntax :-)
- exit `somecommand | wc -l` is a very weird way to check if command output is empty. I recommend you to use subprocess.PIPE instead and check the output yourself.
- I would even drop shell=True at all and manually search for "do-release-upgrade" in the output. No need for grep -v grep will be needed.

review: Needs Resubmitting
Revision history for this message
Sebastien Bacher (seb128) wrote :

setting as "work in progress" to get it out of the sponsoring queue, please set it back to "needs review" once the review comment issues are resolved

Unmerged revisions

55. By Andreas Altaïr Redmer

* check-new-release-gtk:
  - quit if do-release-upgrade is running (LP: #1313012)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'check-new-release-gtk'
2--- check-new-release-gtk 2013-10-04 19:17:49 +0000
3+++ check-new-release-gtk 2014-05-03 03:48:33 +0000
4@@ -92,8 +92,15 @@
5 window.show_all()
6 Gtk.main()
7
8+ # quit if /usr/bin/do-release-upgrade is currently running (LP:# 1313012)
9+ def quit_if_dist_upgrade_running(self):
10+ number_of_running_upgrades = subprocess.call("exit `ps aux|grep /usr/bin/do-release-upgrade|grep -v grep|wc -l`", shell=True)
11+ if (number_of_running_upgrades > 0) :
12+ sys.exit()
13+
14 def new_dist_available(self, meta_release, new_dist):
15 logging.debug("new_dist_available: %s" % new_dist)
16+ self.quit_if_dist_upgrade_running()
17 self.new_dist = new_dist
18 client = Gio.Settings("com.ubuntu.update-manager")
19 ignore_dist = client.get_string("check-new-release-ignore")
20
21=== modified file 'debian/changelog'
22--- debian/changelog 2014-04-11 15:25:07 +0000
23+++ debian/changelog 2014-05-03 03:48:33 +0000
24@@ -1,3 +1,10 @@
25+ubuntu-release-upgrader (1:0.220.2ubuntu1) UNRELEASED; urgency=medium
26+
27+ * check-new-release-gtk:
28+ - quit if do-release-upgrade is running (LP: #1313012)
29+
30+ -- Andreas Altair Redmer <altair.ibn.la.ahad.sy@gmail.com> Sat, 03 May 2014 11:37:24 +0800
31+
32 ubuntu-release-upgrader (1:0.220.2) trusty; urgency=medium
33
34 * DistUpgrade/DistUpgradeController.py:

Subscribers

People subscribed via source and target branches