mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-03-11 06:37:31 +00:00
abuild: fakeroot fix when running as root
This commit is contained in:
parent
e6b33c688d
commit
d68c2e2912
10
abuild.in
10
abuild.in
@ -899,6 +899,14 @@ is_function() {
|
||||
type "$1" 2>&1 | head -n 1 | egrep -q "is a (shell )?function"
|
||||
}
|
||||
|
||||
do_fakeroot() {
|
||||
if [ -n "$FAKEROOT" ]; then
|
||||
$FAKEROOT -- "$@"
|
||||
else
|
||||
"$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# build and package in fakeroot
|
||||
rootpkg() {
|
||||
local do_build=build
|
||||
@ -909,7 +917,7 @@ rootpkg() {
|
||||
fi
|
||||
cd "$startdir"
|
||||
[ -n "$FAKEROOT" ] && msg "Entering fakeroot..."
|
||||
$FAKEROOT -- "$abuild_path" $color_opt $do_build \
|
||||
do_fakeroot "$abuild_path" $color_opt $do_build \
|
||||
prepare_subpackages \
|
||||
prepare_language_packs \
|
||||
prepare_package \
|
||||
|
Loading…
Reference in New Issue
Block a user