Merge ~xnox/grub:fix-postinst-empty-devices into ~ubuntu-core-dev/grub/+git/ubuntu:ubuntu

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: e07b23ad87b50924af36ac86d1dddc3671b4155b
Proposed branch: ~xnox/grub:fix-postinst-empty-devices
Merge into: ~ubuntu-core-dev/grub/+git/ubuntu:ubuntu
Diff against target: 56 lines (+24/-2)
3 files modified
debian/changelog (+8/-0)
debian/grub-multi-install (+8/-1)
debian/postinst.in (+8/-1)
Reviewer Review Type Date Requested Status
Michael Vogt Approve
Julian Andres Klode Pending
Ubuntu Core Development Team Pending
Review via email: mp+391438@code.launchpad.net

Commit message

postinst.in, grub-multi-install: fix logic of skipping installing onto any device, if one chose to not install bootloader on any device. LP: #1896608

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

This looks correct to me, I will try it later today on the machine that failed originally.

review: Approve
Revision history for this message
Michael Vogt (mvo) wrote :

Still approving (but added some ideas) - I tested the fix on the affected machine and it works as expected.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index a702a27..3d6e540 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+grub2 (2.04-1ubuntu35) UNRELEASED; urgency=medium
7+
8+ * postinst.in, grub-multi-install: fix logic of skipping installing onto
9+ any device, if one chose to not install bootloader on any device. LP:
10+ #1896608
11+
12+ -- Dimitri John Ledkov <xnox@ubuntu.com> Mon, 28 Sep 2020 14:05:26 +0100
13+
14 grub2 (2.04-1ubuntu34) groovy; urgency=medium
15
16 * configure.ac: one more dejavu font search path
17diff --git a/debian/grub-multi-install b/debian/grub-multi-install
18index 9bd4089..bedc700 100755
19--- a/debian/grub-multi-install
20+++ b/debian/grub-multi-install
21@@ -402,7 +402,14 @@ while :; do
22 db_fset grub-efi/install_devices_empty seen false
23 fi
24 else
25- exit 1 # noninteractive
26+ # if question was seen we are done
27+ # Otherwise, abort
28+ db_fget grub-efi/install_devices_empty seen
29+ if [ "$RET" = true ]; then
30+ break
31+ else
32+ exit 1
33+ fi
34 fi
35 else
36 break
37diff --git a/debian/postinst.in b/debian/postinst.in
38index e6dfe36..cedc137 100644
39--- a/debian/postinst.in
40+++ b/debian/postinst.in
41@@ -685,7 +685,14 @@ case "$1" in
42 db_fset grub-pc/install_devices_empty seen false
43 fi
44 else
45- exit 1 # noninteractive
46+ # if question was seen we are done
47+ # Otherwise, abort
48+ db_fget grub-pc/install_devices_empty seen
49+ if [ "$RET" = true ]; then
50+ break
51+ else
52+ exit 1
53+ fi
54 fi
55 else
56 break

Subscribers

People subscribed via source and target branches