Merge lp:~jamesodhunt/ubuntu/vivid/ubuntu-core-upgrader/use-os-sync into lp:ubuntu/vivid/ubuntu-core-upgrader

Proposed by James Hunt
Status: Merged
Merged at revision: 32
Proposed branch: lp:~jamesodhunt/ubuntu/vivid/ubuntu-core-upgrader/use-os-sync
Merge into: lp:ubuntu/vivid/ubuntu-core-upgrader
Diff against target: 43 lines (+6/-10)
2 files modified
debian/changelog (+4/-4)
ubuntucoreupgrader/upgrader.py (+2/-6)
To merge this branch: bzr merge lp:~jamesodhunt/ubuntu/vivid/ubuntu-core-upgrader/use-os-sync
Reviewer Review Type Date Requested Status
Michael Vogt (community) Needs Fixing
Review via email: mp+257043@code.launchpad.net

Description of the change

Use os.sync() rather than sync(1).

To post a comment you must log in.
Revision history for this message
Daniel Holbach (dholbach) wrote :
Revision history for this message
Michael Vogt (mvo) wrote :

Nice catch Daniel, indeed.

review: Needs Fixing
33. By James Hunt

* Fixup bug ref in changelog.

Revision history for this message
James Hunt (jamesodhunt) wrote :

Updated.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2015-04-21 12:56:09 +0000
3+++ debian/changelog 2015-04-23 09:01:34 +0000
4@@ -1,10 +1,10 @@
5 ubuntu-core-upgrader (0.7.11) vivid; urgency=medium
6
7- * ubuntucoreupgrader/upgrader.py: Call sync at end of sync_partitions() and
8- after each unpack to minimise unflushed data and thus minimise the risk of
9- corruption issues (such as LP:1435774).
10+ * ubuntucoreupgrader/upgrader.py: Call os.sync() at end of sync_partitions()
11+ and after each unpack to minimise unflushed data and thus minimise the
12+ risk of corruption issues (such as LP: #1435774).
13
14- -- James Hunt <james.hunt@ubuntu.com> Thu, 16 Apr 2015 20:45:12 +0100
15+ -- James Hunt <james.hunt@ubuntu.com> Wed, 22 Apr 2015 10:36:19 +0100
16
17 ubuntu-core-upgrader (0.7.10) vivid; urgency=medium
18
19
20=== modified file 'ubuntucoreupgrader/upgrader.py'
21--- ubuntucoreupgrader/upgrader.py 2015-04-16 19:46:24 +0000
22+++ ubuntucoreupgrader/upgrader.py 2015-04-23 09:01:34 +0000
23@@ -896,9 +896,7 @@
24 self.options.root_dir))
25 tar.close()
26
27- if subprocess.call(['/bin/sync']) != 0:
28- log.error('failed to flush data after unpack')
29- sys.exit(1)
30+ os.sync()
31
32 def sync_partitions(self):
33 '''
34@@ -992,9 +990,7 @@
35 log.error('failed to sync partitions')
36 sys.exit(1)
37
38- if subprocess.call(['/bin/sync']) != 0:
39- log.error('failed to flush data for partition sync')
40- sys.exit(1)
41+ os.sync()
42
43 os.chdir(cwd)
44

Subscribers

People subscribed via source and target branches

to all changes: