Merge lp:~sergiusens/snappy/ubootNoUnnecessaryRewrites into lp:~snappy-dev/snappy/snappy-moved-to-github
| Status: | Merged |
|---|---|
| Approved by: | Michael Vogt on 2015-05-22 |
| Approved revision: | 471 |
| Merged at revision: | 470 |
| Proposed branch: | lp:~sergiusens/snappy/ubootNoUnnecessaryRewrites |
| Merge into: | lp:~snappy-dev/snappy/snappy-moved-to-github |
| Diff against target: |
134 lines (+59/-3) 2 files modified
partition/bootloader_uboot.go (+20/-3) partition/bootloader_uboot_test.go (+39/-0) |
| To merge this branch: | bzr merge lp:~sergiusens/snappy/ubootNoUnnecessaryRewrites |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Michael Vogt | 2015-05-21 | Approve on 2015-05-22 | |
| John Lenton | 2015-05-21 | Approve on 2015-05-21 | |
|
Review via email:
|
|||
Commit Message
Avoid writing to snappy-system.txt if not required
Description of the Change
This code base needs some love and I would of done it here if we didn't need to backport this commit to the 15.04 tree.
| Michael Vogt (mvo) wrote : | # |
| Sergio Schvezov (sergiusens) wrote : | # |
(BeagleBoneBlac
total 4
drwxr-xr-x 3 root root 512 May 21 08:47 a
drwxr-xr-x 3 root root 512 May 21 08:47 b
-rwxr-xr-x 1 root root 1585 May 21 08:47 snappy-system.txt
-rwxr-xr-x 1 root root 237 May 21 08:47 uEnv.txt
(BeagleBoneBlac
(BeagleBoneBlac
total 4
drwxr-xr-x 3 root root 512 May 21 08:47 a
drwxr-xr-x 3 root root 512 May 21 08:47 b
-rwxr-xr-x 1 root root 1585 May 21 08:47 snappy-system.txt
-rwxr-xr-x 1 root root 237 May 21 08:47 uEnv.txt
(BeagleBoneBlac
Name Date Version Developer
ubuntu-core 2015-05-21 2 ubuntu*
ubuntu-core 2015-05-21 2 ubuntu
webdm 2015-05-21 0.6.1 *
beagleblack 2015-05-21 1.7.1 *
(BeagleBoneBlac
Installing ubuntu-core (60)
Starting download of ubuntu-core
138.23 MB / 138.23 MB [======
Done
Name Date Version Developer
ubuntu-core 2015-05-20 60 ubuntu!
Reboot to use the new ubuntu-core.
# timestamp is updated (regular->try a->b)
(BeagleBoneBlac
total 4
drwxr-xr-x 3 root root 512 May 21 08:47 a
drwxr-xr-x 3 root root 512 May 21 08:47 b
-rwxr-xr-x 1 root root 1581 May 21 12:46 snappy-system.txt
-rwxr-xr-x 1 root root 237 May 21 08:47 uEnv.txt
(BeagleBoneBlac
# ...
# timestamp updated (try->regular)
(BeagleBoneBlac
total 4
drwxr-xr-x 3 root root 512 May 21 08:47 a
drwxr-xr-x 3 root root 512 May 21 08:47 b
-rwxr-xr-x 1 root root 1585 May 21 12:54 snappy-system.txt
-rwxr-xr-x 1 root root 237 May 21 08:47 uEnv.txt
I'll do another test later
| Sergio Schvezov (sergiusens) wrote : | # |
thanks for the review, will update in a bit
- 469. By Sergio Schvezov on 2015-05-21
-
Remove unnecessary check if atomicWrite was called.
- 470. By Sergio Schvezov on 2015-05-21
-
Don't make atomicFileUpdat
eImpl a var - 471. By Sergio Schvezov on 2015-05-21
-
Taking into consideration the almost impossible case of snappy-system.txt being incomplete.
| Michael Vogt (mvo) wrote : | # |
Thanks a lot for this update Sergio! This is good to go now :) In a better world we would also have a unittest for atomicFileUpdate() but I think the tests you added are just fine for now (as this needs a 15.04 backport). And we can improve further later. In any case, thanks a lot for working on this!
| Michael Vogt (mvo) wrote : | # |
What should we do about the cherry pick to 15.04? Will there be a separate branch?


Looks good, some comments inline, feel free to ignore.