kiss: pkg_find() only gen glob onc.

This commit is contained in:
Dylan Araps 2020-01-12 19:55:12 +02:00
parent 527dd10adc
commit 0eddd6f612
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

14
kiss
View File

@ -262,10 +262,17 @@ pkg_fixdeps() {
# reference to 'diff' against.
[ -f depends ] && cp -f depends depends-copy
# Generate a list of all installed manifests.
pkg_name=$1
set +f
set -f -- "$sys_db/"*/manifest
# Get a list of binaries and libraries, false files
# will be found, however it's faster to get 'ldd' to check
# them anyway than to filter them out.
find "$pkg_dir/$1" -type f 2>/dev/null | while read -r file; do
find "$pkg_dir/$pkg_name" -type f 2>/dev/null |
while read -r file; do
# Run 'ldd' on the file and parse each line. The code
# then checks to see which packages own the linked
# libraries and it prints the result.
@ -278,7 +285,7 @@ pkg_fixdeps() {
dep=${dep% *}
# Figure out which package owns the file.
dep=$(set +f; grep -lFx "${dep##$KISS_ROOT}" "$sys_db/"*/manifest)
dep=$(grep -lFx "${dep##$KISS_ROOT}" "$@")
# Extract package name from 'grep' match.
dep=${dep%/*}
@ -492,8 +499,7 @@ pkg_build() {
log "$pkg" "Starting build"
# Call the build script.
"$repo_dir/build" "$pkg_dir/$pkg" >>"${KISS_BFD:=/dev/fd/0}" 2>&1 ||
die "$pkg" "Build failed"
"$repo_dir/build" "$pkg_dir/$pkg" || die "$pkg" "Build failed"
# Copy the repository files to the package directory.
# This acts as the database entry.