From: Daisuke Fujimura <booleanlabel@gmail.com>
To: cygwin-apps@cygwin.com
Subject: [PATCH cygport] pkg_info.cygpart: Do not detect dependencies on itself in ruby package
Date: Fri, 16 Feb 2024 21:51:57 +0900 [thread overview]
Message-ID: <CAA3frXRp33vRTRr5y6HURfXS89g8WFZz9fsFaVhx9Syr7CuT9Q@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 155 bytes --]
Attempting to create a package for ruby-3.3, but it fails when trying
to detect a dependency on itself.
To avoid this, skip them if the target is `ruby`.
[-- Attachment #2: pkg_info-for-ruby.diff --]
[-- Type: application/octet-stream, Size: 1706 bytes --]
diff --git a/lib/pkg_info.cygpart b/lib/pkg_info.cygpart
index 37cfa676..9cd7d06b 100644
--- a/lib/pkg_info.cygpart
+++ b/lib/pkg_info.cygpart
@@ -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//:/ }"
@@ -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 \
@@ -661,7 +661,7 @@ for suffix, mode, type in imp.get_suffixes(): print(suffix)')
cygruby[0-9][0-9]0.dll)
rbver="${dll##*cygruby}"
rbver="${rbver%%0.dll}"
- echo "ruby_${rbver}"
+ [ "${PN}" != "ruby" ] && echo "ruby_${rbver}"
;;
esac
done
next reply other threads:[~2024-02-16 12:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-16 12:51 Daisuke Fujimura [this message]
2024-03-10 13:34 ` Jon Turney
2024-04-03 14:18 ` Daisuke Fujimura
2024-05-06 14:12 ` Jon Turney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAA3frXRp33vRTRr5y6HURfXS89g8WFZz9fsFaVhx9Syr7CuT9Q@mail.gmail.com \
--to=booleanlabel@gmail.com \
--cc=cygwin-apps@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).