Dylan Araps 2021-06-29 15:22:46 +00:00
parent a636173f47
commit c8fa0e7c83
1 changed files with 9 additions and 8 deletions

17
kiss
View File

@ -622,7 +622,6 @@ pkg_build() {
# Build packages and turn them into packaged tarballs. # Build packages and turn them into packaged tarballs.
log "Resolving dependencies" log "Resolving dependencies"
argc=$#
# Mark packages passed on the command-line separately from those # Mark packages passed on the command-line separately from those
# detected as dependencies. We need to treat explicitly passed packages # detected as dependencies. We need to treat explicitly passed packages
@ -641,22 +640,24 @@ pkg_build() {
# and instead install pre-built binaries if they exist. # and instead install pre-built binaries if they exist.
[ "$pkg_update" ] || explicit_build=$explicit [ "$pkg_update" ] || explicit_build=$explicit
set --
# If an explicit package is a dependency of another explicit package, # If an explicit package is a dependency of another explicit package,
# remove it from the explicit list as it needs to be installed as a # remove it from the explicit list as it needs to be installed as a
# dependency. # dependency.
for pkg do for pkg in $explicit do
contains "$deps" "$pkg" || explicit2=" $explicit2 $pkg " contains "$deps" "$pkg" || set -- "$@" "$pkg"
done done
explicit=$explicit2 explicit_cnt=$#
log "Building: explicit: $*${deps:+, implicit: ${deps## }}"
# See [1] at top of script. # See [1] at top of script.
# shellcheck disable=2046,2086 # shellcheck disable=2046,2086
set -- $deps $explicit set -- $deps "$@"
log "Building: $*"
# Ask for confirmation if extra packages need to be built. # Ask for confirmation if extra packages need to be built.
[ "$#" != "$argc" ] || [ "$pkg_update" ] && prompt [ "$#" -ne "$explicit_cnt" ] || [ "$pkg_update" ] && prompt
for pkg do pkg_lint "$pkg"; done for pkg do pkg_lint "$pkg"; done