aboutsummaryrefslogtreecommitdiffstats
path: root/main/abuild/0001-abuild-wrap-check-with-fakeroot.patch
blob: 50cfec21f12b5afb996aa29944192686f5d367df (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
37
38
39
From 1ddc910eb328b4534234bd2f97e631a075241abd Mon Sep 17 00:00:00 2001
From: William Pitcock <nenolod@dereferenced.org>
Date: Mon, 27 Mar 2017 19:38:38 +0000
Subject: [PATCH] abuild: wrap check() with fakeroot

---
 abuild.in | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/abuild.in b/abuild.in
index c6ee5f3..f435ffc 100644
--- a/abuild.in
+++ b/abuild.in
@@ -1401,7 +1401,7 @@ create_apks() {
 }
 
 build_abuildrepo() {
-	local d apk _build=build _check=check
+	local d apk _build=build _check=check_fakeroot
 	if ! is_function package; then
 		# if package() is missing then build is called from rootpkg
 		_build=true
@@ -1626,6 +1626,13 @@ do_fakeroot() {
 	fi
 }
 
+# wrap check() with fakeroot
+check_fakeroot() {
+	cd "$startdir"
+	[ -n "$FAKEROOT" ] && msg "Entering fakeroot..."
+	do_fakeroot "$abuild_path" $color_opt $keep_build check
+}
+
 # build and package in fakeroot
 rootpkg() {
 	local _package=package
-- 
2.12.1