Commit d1b6da64 authored by Natanael Copa's avatar Natanael Copa

abuild: whitespace fixes. use longopts for apk

parent 60eb0dc8
...@@ -135,7 +135,7 @@ default_sanitycheck() { ...@@ -135,7 +135,7 @@ default_sanitycheck() {
[ -z "${pkgname##* *}" ] && die "pkgname contains spaces" [ -z "${pkgname##* *}" ] && die "pkgname contains spaces"
[ -z "$pkgver" ] && die "Missing pkgver in APKBUILD" [ -z "$pkgver" ] && die "Missing pkgver in APKBUILD"
if [ "$pkgver" != "volatile" ] && [ -z "$nodeps" ]; then if [ "$pkgver" != "volatile" ] && [ -z "$nodeps" ]; then
$APK version --check -q "$pkgver" ||\ $APK version --check --quiet "$pkgver" ||\
die "$pkgver is not a valid version" die "$pkgver is not a valid version"
fi fi
[ -z "$pkgrel" ] && die "Missing pkgrel in APKBUILD" [ -z "$pkgrel" ] && die "Missing pkgrel in APKBUILD"
...@@ -970,7 +970,7 @@ trace_apk_deps() { ...@@ -970,7 +970,7 @@ trace_apk_deps() {
if [ -f "$dir"/.rpaths ]; then if [ -f "$dir"/.rpaths ]; then
local so_files=$(find_so_files "$dir"/.rpaths $missing) \ local so_files=$(find_so_files "$dir"/.rpaths $missing) \
|| return 1 || return 1
deppkgs=$($APK info -q -W $so_files) || return 1 deppkgs=$($APK info --quiet --who-owns $so_files) || return 1
fi fi
for found in $deppkgs; do for found in $deppkgs; do
...@@ -1437,7 +1437,7 @@ deptrace() { ...@@ -1437,7 +1437,7 @@ deptrace() {
( depparse_aports ( depparse_aports
if [ -z "$upgrade" ]; then if [ -z "$upgrade" ]; then
# list installed pkgs and prefix with 'i ' # list installed pkgs and prefix with 'i '
$APK info -q | sort | sed 's/^/i /' $APK info --quiet | sort | sed 's/^/i /'
fi fi
) | awk -v pkgs="$deps" ' ) | awk -v pkgs="$deps" '
...@@ -1476,11 +1476,11 @@ builddeps() { ...@@ -1476,11 +1476,11 @@ builddeps() {
subpackages_has ${i%%[<>=]*} || deps="$deps $i" subpackages_has ${i%%[<>=]*} || deps="$deps $i"
done done
installed_deps=$($APK info -e $deps) installed_deps=$($APK info --installed $deps)
# find which deps are missing # find which deps are missing
for i in $deps; do for i in $deps; do
if [ "${i#\!}" != "$i" ]; then if [ "${i#\!}" != "$i" ]; then
$APK info -q -e "${i#\!}" \ $APK info --quiet --installed "${i#\!}" \
&& conflicts="$conflicts ${i#\!}" && conflicts="$conflicts ${i#\!}"
elif ! deplist_has $i $installed_deps || [ -n "$upgrade" ]; then elif ! deplist_has $i $installed_deps || [ -n "$upgrade" ]; then
missing="$missing $i" missing="$missing $i"
...@@ -1538,7 +1538,7 @@ builddeps() { ...@@ -1538,7 +1538,7 @@ builddeps() {
cd "$dir" && $0 $forceroot $keep $quiet $install_deps \ cd "$dir" && $0 $forceroot $keep $quiet $install_deps \
$recursive $upgrade $color_opt abuildindex || return 1 $recursive $upgrade $color_opt abuildindex || return 1
done done
$SUDO_APK add -u --repository "$abuildrepo" \ $SUDO_APK add --upgrade --repository "$abuildrepo" \
$apk_opt_wait \ $apk_opt_wait \
--virtual .makedepends-$pkgname $deps --virtual .makedepends-$pkgname $deps
} }
...@@ -1670,7 +1670,8 @@ post_add() { ...@@ -1670,7 +1670,8 @@ post_add() {
post_add $i || return 1 post_add $i || return 1
fi fi
done done
$SUDO_APK add $apk_opt_wait -u "$pkgf" || die "Failed to install $1" $SUDO_APK add $apk_opt_wait --upgrade "$pkgf" \
|| die "Failed to install $1"
} }
installdeps() { installdeps() {
......
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