diff options
author | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2019-09-10 09:00:59 +0000 |
---|---|---|
committer | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2019-09-10 09:00:59 +0000 |
commit | 395d17dfc3ca7a6ef76b5d3fb6ae6007ef807666 (patch) | |
tree | 2622bcec40ccdc0429f64f08ed503f94c08bdbb0 | |
parent | fa7a076174c00d1954b085424763fd12e4ae4b88 (diff) | |
download | cpt-395d17dfc3ca7a6ef76b5d3fb6ae6007ef807666.tar.gz |
kiss: clean up
FossilOrigin-Name: 15559823a67915bee1ce2ed9a9c5e0d65cba9f23f1fd1205307a460568926263
-rwxr-xr-x | kiss | 20 |
1 files changed, 6 insertions, 14 deletions
@@ -261,28 +261,20 @@ pkg_fixdeps() { # each binary and library with 'ldd'. This catches any extra # libraries and or dependencies pulled in by the package's # build suite. - - # Store the package name in a variable as the code below - # redefines the argument list. - pkg_name=$1 - - log "[$1] Checking 'ldd' for missing dependencies" + log "[$1] Checking for missing dependencies" # Go to the directory containing the built package to # simplify path building. cd "$pkg_dir/$1/$pkg_db/$1" - # Generate 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. - set -- $(find "$pkg_dir/$1/usr/bin/" \ - "$pkg_dir/$1/usr/lib/" -type f 2>/dev/null) - # Make a copy of the depends file if it exists to have a # reference to 'diff' against. [ -f depends ] && cp -f depends depends-copy - for file; do + # 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 # 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. @@ -307,7 +299,7 @@ pkg_fixdeps() { case $dep in # Skip listing these packages as dependencies. - musl|gcc|$pkg_name) ;; + musl|gcc|${PWD##*/}) ;; *) printf '%s\n' "$dep" ;; esac done ||: |