Quoting Antonio Terceiro (2014-07-23 16:57:40) > On Wed, Jul 23, 2014 at 10:39:45AM +0200, Jonas Smedegaard wrote: >> For uWSGI packaging I need to know at build time which flavors of >> ruby are supported in the build environment and which of those is >> default for that environment. >> >> I can hardcode values for Sid (currently "ruby2.1" for both), but >> would highly prefer to query the build environment as that eases >> backportability. >> >> Here is the current one-liner I currently use to resolve supported >> flavors: >> >> ruby -rruby_debian_dev -e 'include RubyDebianDev; >> SUPPORTED_RUBY_VERSIONS.select! do |version, binary|; puts version; end' >> >> Please consider documenting either that above command is correct, or >> which other shell command is more proper. > > Does > http://anonscm.debian.org/cgit/collab-maint/ruby-defaults.git/commit/?id=24da0892ae3dd57581394ac7bf8fc8b44e8f0251 > address your concerns? > > The easy way is `dh_ruby --print-supported`
Yes, above is exactly what I was looking for. Thanks! I would not expect such detailed info to be documented in long description of a package, though, but instead in README file of said package. I recommend you to duplicate (or for the command options at least, move) the info to the README file. > However, we decided to not support multiple interpreters in stable > releases anymore, so keep in mind this support for multiple supported > versions will be used solely for handling transitions in unstable > without leaving testing broken while eventual issues are sorted out > (we will hold new intepreters in unstable until we think it is safe > enough to let it into testing). > > It is also OK to only build for the default version, and using just > `ruby` (instead of harcoding the current default) will do that in a > future-proof way. > >> And please also document if default flavor is simply the first entry >> of (potentially) multi-entry list output of above command, or else >> which shell command can resolve default Ruby flavor of current >> system. > > the default is always what /usr/bin/ruby points to. That is very valuable information too. I recommend that you document that in a mini policy for the Ruby language somewhere - e.g. on a wiki page. - Jonas -- * Jonas Smedegaard - idealist & Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ [x] quote me freely [ ] ask before reusing [ ] keep private
signature.asc
Description: signature