Merge lp:~daniel-thewatkins/livecd-rootfs/label-function into lp:livecd-rootfs

Proposed by Dan Watkins on 2016-09-02
Status: Merged
Merged at revision: 1461
Proposed branch: lp:~daniel-thewatkins/livecd-rootfs/label-function
Merge into: lp:livecd-rootfs
Diff against target: 41 lines (+9/-2)
3 files modified
live-build/ubuntu-cpc/functions (+7/-0)
live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary (+1/-1)
live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary (+1/-1)
To merge this branch: bzr merge lp:~daniel-thewatkins/livecd-rootfs/label-function
Reviewer Review Type Date Requested Status
Jose L. VG (community) Approve on 2016-11-23
Brian Murray 2016-09-02 Pending
Review via email: mp+304767@code.launchpad.net
To post a comment you must log in.
Jose L. VG (josvaz) wrote :

LGTM!

review: Approve
Brian Murray (brian-murray) wrote :

It's been a few months, is this still important to merge?

Dan Watkins (daniel-thewatkins) wrote :

This isn't especially important, but it would make things slightly neater.

Brian Murray (brian-murray) wrote :

Alright, I've merged it.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'live-build/ubuntu-cpc/functions'
2--- live-build/ubuntu-cpc/functions 2016-02-07 05:26:04 +0000
3+++ live-build/ubuntu-cpc/functions 2016-09-02 11:54:41 +0000
4@@ -249,4 +249,11 @@
5 qemu-img info "$destination"
6 }
7
8+replace_grub_root_with_label() {
9+ # When update-grub is run, it will detect the disks in the build system.
10+ # Instead, we want grub to use the cloudimg-rootfs labelled disk
11+ CHROOT_ROOT="$1"
12
13+ sed -i -e "s,root=[^ ]\+,root=LABEL=cloudimg-rootfs," \
14+ "$CHROOT_ROOT/boot/grub/grub.cfg"
15+}
16
17=== modified file 'live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary'
18--- live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary 2016-02-06 08:34:16 +0000
19+++ live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary 2016-09-02 11:54:41 +0000
20@@ -108,7 +108,7 @@
21
22 chroot mountpoint dpkg-divert --local --rename /etc/grub.d/30_os-prober
23 chroot mountpoint update-grub
24- sed -i "s,root=.* ,root=LABEL=cloudimg-rootfs ,g" mountpoint/boot/grub/grub.cfg
25+ replace_grub_root_with_label mountpoint
26 chroot mountpoint dpkg-divert --remove --local --rename /etc/grub.d/30_os-prober
27
28 chroot mountpoint apt-get -y clean
29
30=== modified file 'live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary'
31--- live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary 2016-06-09 14:48:38 +0000
32+++ live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary 2016-09-02 11:54:41 +0000
33@@ -52,7 +52,7 @@
34
35 chroot mountpoint dpkg-divert --local --rename /etc/grub.d/30_os-prober
36 chroot mountpoint update-grub
37- sed -i "s,root=.* ,root=LABEL=cloudimg-rootfs ,g" mountpoint/boot/grub/grub.cfg
38+ replace_grub_root_with_label mountpoint
39 chroot mountpoint dpkg-divert --remove --local --rename /etc/grub.d/30_os-prober
40
41 umount_partition mountpoint

Subscribers

People subscribed via source and target branches