Skip to content

Commit 00434f7

Browse files
authored
Allow live-build to remove protected packages during iso bootloader stage (elementary#517)
1 parent f8f0031 commit 00434f7

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

build.sh

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ apt-get install -y live-build patch ubuntu-keyring
3030
# https://salsa.debian.org/live-team/live-build/merge_requests/31
3131
patch -d /usr/lib/live/build/ < live-build-fix-syslinux.patch
3232

33+
patch -d /usr/lib/live/build/ < live-build-fix-shim-remove.patch
34+
3335
# TODO: Remove this once debootstrap 1.0.117 or newer is released and available:
3436
# https://salsa.debian.org/installer-team/debootstrap/blob/master/debian/changelog
3537
ln -sfn /usr/share/debootstrap/scripts/gutsy /usr/share/debootstrap/scripts/focal

live-build-fix-shim-remove.patch

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--- /usr/lib/live/build/binary_grub-efi 2019-03-11 10:05:40.000000000 +0000
2+
+++ /usr/lib/live/build/binary_grub-efi_v2 2021-08-04 13:37:20.064547041 +0000
3+
@@ -267,8 +267,12 @@
4+
# Saving cache
5+
Save_cache cache/packages.binary
6+
7+
- # Removing depends
8+
- Remove_package
9+
+ # Removing depends, some bootloader packages are marked as Protected/Important
10+
+ # in Ubuntu, so temporarily add an apt flag to allow them to be removed
11+
+ PRE_APT_OPTIONS="${APT_OPTIONS}"
12+
+ APT_OPTIONS="${APT_OPTIONS} --allow-remove-essential"
13+
+ Remove_package
14+
+ APT_OPTIONS="${PRE_APT_OPTIONS}"
15+
;;
16+
17+
false)
18+

0 commit comments

Comments
 (0)