aboutsummaryrefslogtreecommitdiffstats
path: root/main/alpine-conf/0002-update-kernel-don-t-install-deps-if-script-runs-in-f.patch
blob: a7fe05a360f71d4349f234eacb736cbdc3ab2cac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 439c020e268830965fd5ee90147e93e753855caf Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Mon, 5 Dec 2016 21:05:51 +0000
Subject: [PATCH 2/3] update-kernel: don't install deps if script runs in
 fakeroot

---
 update-kernel.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/update-kernel.in b/update-kernel.in
index 6d24649..918055a 100644
--- a/update-kernel.in
+++ b/update-kernel.in
@@ -154,14 +154,16 @@ clean_up() {
 	set +e
 	ignore_sigs
 
-	[ "$SUPERUSER" ] && apk del $QUIET_OPT $VIRTUAL
+	if [ "$SUPERUSER" ] && [ -z "$FAKEROOTKEY" ]; then
+		apk del $QUIET_OPT $VIRTUAL
+	fi
 	rm -fr $TMPDIR
 }
 
 trap clean_up EXIT $SIGNALS
 
 
-if [ "$SUPERUSER" ]; then
+if [ "$SUPERUSER" ] && [ -z "$FAKEROOTKEY" ]; then
 	apk add $QUIET_OPT --update-cache -t $VIRTUAL mkinitfs squashfs-tools kmod
 fi
 
-- 
2.11.0