abuild: replace $0 with $abuild_path, add $forceroot where missing

This commit is contained in:
Disassembler 2018-10-23 11:02:54 +02:00 committed by Natanael Copa
parent 909623950f
commit 9b04be2f79

View File

@ -760,7 +760,7 @@ prepare_subpackages() {
# call abuild recursively, setting subpkg{dir,name}
( subpkg_set "$i"; msg "Running split function $subpkgsplit..."; \
subpkgdir="$pkgbasedir/$subpkgname" subpkgname="$subpkgname" subpkgarch="$subpkgarch" \
$0 pre_split $subpkgsplit prepare_package \
"$abuild_path" $forceroot pre_split $subpkgsplit prepare_package \
&& postcheck "$pkgbasedir/$subpkgname" "$subpkgname" ) || return 1
done
postcheck "$pkgdir" "$pkgname" || return 1
@ -813,7 +813,7 @@ prepare_language_packs() {
lang="$lang" \
subpkgname="$pkgname-lang-$lang" \
subpkgdir="$pkgbasedir"/$subpkgname \
$0 lang_subpkg prepare_package || return 1
"$abuild_path" $forceroot lang_subpkg prepare_package || return 1
done
}
@ -937,7 +937,7 @@ prepare_metafiles() {
subpkgarch="$arch"
fi
echo "# Generated by $(basename $0) $program_version" >"$pkginfo"
echo "# Generated by $(basename "$abuild_path") $program_version" >"$pkginfo"
if [ -n "$FAKEROOTKEY" ]; then
echo "# using $($FAKEROOT -v)" >> "$pkginfo"
fi
@ -1763,7 +1763,7 @@ do_fakeroot() {
check_fakeroot() {
cd "$startdir"
[ -n "$FAKEROOT" ] && msg "Entering fakeroot..."
do_fakeroot "$abuild_path" $color_opt $keep_build check
do_fakeroot "$abuild_path" $forceroot $color_opt $keep_build check
}
# build and package in fakeroot
@ -1771,7 +1771,7 @@ rootpkg() {
cd "$startdir"
rm -rf "$pkgdir"
[ -n "$FAKEROOT" ] && msg "Entering fakeroot..."
do_fakeroot "$abuild_path" $color_opt $keep_build \
do_fakeroot "$abuild_path" $forceroot $color_opt $keep_build \
package \
prepare_subpackages \
prepare_language_packs \
@ -2090,7 +2090,7 @@ builddeps() {
export ABUILD_VISITED="$ABUILD_VISITED $pkg"
msg "Entering $dir"
cd "$dir" && $0 $forceroot $keep $keep_build $quiet \
cd "$dir" && "$abuild_path" $forceroot $keep $keep_build $quiet \
$install_deps $recursive $upgrade $color_opt \
abuildindex || return 1
done