Skip to content

Commit

Permalink
Avoid using ruby to look for dependencies when building ruby package
Browse files Browse the repository at this point in the history
When building ruby itself, this dependency check will run the just-built
ruby from ${D}, which will give warnings when executing because it's not
properly installed yet.

https://cygwin.com/pipermail/cygwin-apps/2024-April/043656.html
  • Loading branch information
fd00 authored and jon-turney committed May 6, 2024
1 parent 8797107 commit 6301bf1
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions lib/pkg_info.cygpart
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ for suffix, mode, type in imp.get_suffixes(): print(suffix)')
done
done

if check_prog ruby
if [ "${PN}" != "ruby" ] && check_prog ruby
then
rbdirs=($(ruby -e 'print($:.join(" "))'))
rbdirs+=" ${DEPS_PATH//:/ }"
Expand Down Expand Up @@ -597,19 +597,19 @@ for suffix, mode, type in imp.get_suffixes(): print(suffix)')
done
done
done
fi

rbver=( $(find "${@//^_^/ }" -path "usr/*/ruby/vendor_ruby/[0-9].[0-9]/*" \
| sed -E 's!usr/.*/ruby/vendor_ruby/([0-9]).([0-9])/.*!ruby_\1\2!' \
| sort -ru) )
if [ "${#rbver[@]}" -gt 1 ]
then
warning "More than one targeted Ruby version: ${rbver[*]},"
warning "using only the latest as dependency: ${rbver[0]}."
fi
if [ "${#rbver[@]}" -gt 0 ] && [ "${PN}" != "ruby" ]
then
echo "${rbver[0]}"
rbver=( $(find "${@//^_^/ }" -path "usr/*/ruby/vendor_ruby/[0-9].[0-9]/*" \
| sed -E 's!usr/.*/ruby/vendor_ruby/([0-9]).([0-9])/.*!ruby_\1\2!' \
| sort -ru) )
if [ "${#rbver[@]}" -gt 1 ]
then
warning "More than one targeted Ruby version: ${rbver[*]},"
warning "using only the latest as dependency: ${rbver[0]}."
fi
if [ "${#rbver[@]}" -gt 0 ]
then
echo "${rbver[0]}"
fi
fi

if [ $(find "${@//^_^/ }" -path 'usr/share/doc/*' -prune \
Expand Down

0 comments on commit 6301bf1

Please sign in to comment.