Commit 92417870 authored by Natanael Copa's avatar Natanael Copa

abuild: properly pass over args when building recursively

parent 9d0a8124
......@@ -804,7 +804,7 @@ deptrace() {
# build and install dependencies
builddeps() {
local deps= alldeps= pkg= i= dir= ver= missing= installed_deps=
local filtered_deps=
local filtered_deps= conflicts=
[ -n "$nodeps" ] && return 0
msg "Analyzing dependencies..."
......@@ -819,17 +819,22 @@ builddeps() {
for i in $deps; do
if [ "${i#\!}" != "$i" ]; then
list_has ${i#\!} $installed_deps \
&& die "Conflicting package ${i#\!} is installed."
&& conflicts="$conflicts ${i#\!}"
elif ! deplist_has $i $installed_deps; then
if [ -z "$install_deps" ] && [ -z "$recursive" ]; then
die "Missing dependency $i. Use -r to autoinstall or -R to build"
fi
missing="$missing $i"
fi
done
[ -z "$missing" ] && [ -z "$install_deps" ] && [ -z "$recursive" ] \
&& return 0
if [ -n "$conflicts" ]; then
die "Conflicting package(s) installed:$conflics"
fi
if [ -z "$install_deps" ] && [ -z "$recursive" ]; then
# if we dont have any missing deps we are done now
[ -z "$missing" ] && return 0
error "Missing dependencies: $missing Use -r to autoinstall or -R to build"
return 1
fi
uninstall_after=".makedepends-$pkgname $uninstall_after"
if [ -n "$install_deps" ] && [ -z "$recursive" ]; then
......@@ -860,7 +865,8 @@ builddeps() {
local pkg=${i%:*}
if [ -d "$dir" ]; then
msg "Entering $dir"
cd "$dir" && $0 -k -r abuildindex || return 1
cd "$dir" && $0 $forceroot $keep $quiet $install_deps \
$recursive $upgrade abuildindex || return 1
fi
done
$SUDO $APK add -u --repository "$abuildrepo" \
......@@ -1046,20 +1052,20 @@ unset recursive
while getopts "dfFhi:kinp:P:qrRs:u" opt; do
case $opt in
'd') nodeps=1;;
'f') force=1;;
'F') forceroot=1;;
'f') force="-f";;
'F') forceroot="-F";;
'h') usage;;
'i') install_after="$install_after $OPTARG";;
'k') keep=1;;
'k') keep="-k";;
'n') die "Use newapkbuild to create new aports";;
'p') PKGDEST=$OPTARG;;
'P') REPODEST=$OPTARG;;
'q') quiet=1;;
'r') install_deps=1;;
'R') recursive=1;;
'q') quiet="-q";;
'r') install_deps="-r";;
'R') recursive="-R";;
's') SRCDEST=$OPTARG;;
'u') upgrade=1
recursive=1;;
'u') upgrade="-u"
recursive="-R";;
esac
done
shift $(( $OPTIND - 1 ))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment