[csw-pkgsubmissions] newpkgs libruby18_1, ruby, ruby18, ruby18_dev(...)

Ben Walton bwalton at opencsw.org
Sun Mar 20 13:49:47 CET 2011


Excerpts from Ben Walton's message of Fri Mar 18 20:37:25 -0400 2011:

> [1] If you look for ENV['CC'] and expect an unqualified binary to make
>     the choice, you're opening the issue to wider problems.  You're
>     then going to assume that cc is sun pro when it need not be.  Same
>     for gcc.  Do you assume it's version 4?  The options in the other
>     variables currently assume that's the case, but what if this
>     changes.  The current mechanisms are using known working
>     combinations of settings.

If this were to be implemented, your proposed solution is incorrect
for maintainability reasons.  It should rather be:

The rbconfig.rb file contains _nothing_ but a toggle based on
ENV['CC'].

If rbconfig.ENV['CC'].rb exists, require it.  If ENV['CC'] is nil or
rbconfig.ENV['CC'].rb doesn't exist, require rbconfig.default.rb.
Alternatives should then be used to toggle rbconfig.default.rb between
the available options.

This makes it much more sane to maintain from the packaging
perspective while offering the same 'flexibility.'  I still don't
think it stands up very well in an environment where you may want to
use gcc3, gcc4, sun cc and some other cc though.  You'd need unique
binary names for each different compiler or do some sort of runtime
version detection, etc...none of those are good options, imo.

Thanks
-Ben
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302



More information about the pkgsubmissions mailing list