Merge ~xnox/grub:fix-postinst into ~ubuntu-core-dev/grub/+git/ubuntu:focal-security

Proposed by Dimitri John Ledkov
Status: Rejected
Rejected by: Dimitri John Ledkov
Proposed branch: ~xnox/grub:fix-postinst
Merge into: ~ubuntu-core-dev/grub/+git/ubuntu:focal-security
Diff against target: 31 lines (+11/-1)
2 files modified
debian/changelog (+10/-0)
debian/postinst.in (+1/-1)
Reviewer Review Type Date Requested Status
Robert C Jennings (community) Approve
Pat Viafore (community) Approve
Julian Andres Klode Pending
Ubuntu Core Development Team Pending
Review via email: mp+388383@code.launchpad.net

Commit message

Trying to fix non-interactive postinst of grub-pc upgrades.

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Need to prepare ppa with this change.

Revision history for this message
Pat Viafore (patviafore) :
review: Approve
Revision history for this message
Robert C Jennings (rcj) wrote :

Dimitri, you've asked for my review and this addition looks reasonable, but I'm not familiar enough with the code to know if the next block dealing with install_devices_empty should still break during non-interactive or if it should be similarly changed.

review: Needs Information
Revision history for this message
Robert C Jennings (rcj) wrote :

From IRC (#ubuntu-server): install_devices_empty means "i chose _to_ have package installed, but not actually install grub anywhere" which is fine non-interactively. because i want to have grub-install available to "rescue" other drives for example.

That answers my question so I'm +1

review: Approve
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Wrong branch target.

Better target & better commit message at https://code.launchpad.net/~ubuntu-core-dev/grub/+git/ubuntu/+merge/388432

Unmerged commits

5b31b1c... by Dimitri John Ledkov

When upgrading non-interactively, and grub-pc installation fails on to the configured devices abort the package upgrade. This should prevent missmatch between the grub core installed on the boot device and the grub modules unpacked. Missmatch between core and modules may lead to unpredictable results and boot failures. LP: #1889556

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 4d388c9..e5fca29 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,13 @@
6+grub2 (2.04-1ubuntu26.2) UNRELEASED; urgency=medium
7+
8+ * When upgrading non-interactively, and grub-pc installation fails on to
9+ the configured devices abort the package upgrade. This should prevent
10+ missmatch between the grub core installed on the boot device and the
11+ grub modules unpacked. Missmatch between core and modules may lead to
12+ unpredictable results and boot failures. LP: #1889556
13+
14+ -- Dimitri John Ledkov <xnox@ubuntu.com> Thu, 30 Jul 2020 15:19:17 +0100
15+
16 grub2 (2.04-1ubuntu26.1) focal; urgency=medium
17
18 [ Julian Andres Klode ]
19diff --git a/debian/postinst.in b/debian/postinst.in
20index 4e1dafa..d0e68ae 100644
21--- a/debian/postinst.in
22+++ b/debian/postinst.in
23@@ -658,7 +658,7 @@ case "$1" in
24 continue
25 fi
26 else
27- break # noninteractive
28+ exit 1 # noninteractive
29 fi
30 fi
31 fi

Subscribers

People subscribed via source and target branches