#65329 closed defect (fixed)
ruby-build @20220426: Improper dependency specification
Reported by: | halostatue (Austin Ziegler) | Owned by: | mojca (Mojca Miklavec) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.2 |
Keywords: | Cc: | ||
Port: | ruby-build |
Description
When running sudo port install ruby-build
, I was surprised to see that it prompted me to install rbenv
as a dependency. This is not a requirement from rbenv/ruby-build itself:
ruby-build is a command-line utility that makes it easy to install virtually any version of Ruby, from source.
It is available as a plugin for rbenv that provides the rbenv install command, or as a standalone program.
I explicitly do not want to use rbenv (I prefer chruby, although I am preparing to write a fully-native Fish version), and would rather not have it installed.
I believe that the dependency specification for this port should be broken. I’m happy to submit a PR for this, but feel it’s more appropriate to open a ticket for discussion first.
-
ruby/ruby-build/Portfile
diff --git i/ruby/ruby-build/Portfile w/ruby/ruby-build/Portfile index 202cd7948cba..bbb4c4fb1047 100644
i w use_configure no 22 22 build {} 23 23 destroot.cmd ./install.sh 24 24 destroot.env PREFIX=${destroot}${prefix} 25 26 depends_lib port:rbenv
Change History (7)
comment:1 Changed 2 years ago by halostatue (Austin Ziegler)
comment:2 Changed 2 years ago by jmroot (Joshua Root)
Owner: | set to mojca |
---|---|
Status: | new → assigned |
comment:3 Changed 2 years ago by halostatue (Austin Ziegler)
-
ruby/ruby-build/Portfile
diff --git i/ruby/ruby-build/Portfile w/ruby/ruby-build/Portfile index 202cd7948cba..448d5801dc9f 100644
i w destroot.cmd ./install.sh 24 24 destroot.env PREFIX=${destroot}${prefix} 25 25 26 26 depends_lib port:rbenv 27 28 variant standalone description {Installs ruby-build without also installing rbenv} { 29 depends_lib-delete port:rbenv 30 }
This could also be done as a variant, sudo port install ruby-build +standalone
. IMO, if this were just being added to MacPorts now, this would be the opposite way (such that rbenv
has a variant +build
or +install
that adds ruby-build
as a dependency to power the rbenv install
plug-in).
comment:4 Changed 23 months ago by halostatue (Austin Ziegler)
I have implemented this both ways:
- #16274, where
rbenv
now has a variant to addruby-build
andruby-build
no longer depends onrbenv
. This is the *correct* fix, but it may be deemed incompatible with existing versions. - #16273, where
ruby-build
now as a variant+standalone
to skip installingrbenv
. This is not the correct fix, but it is more compatible.
I personally prefer the former, but would like to see this resolved.
comment:5 Changed 22 months ago by halostatue (Austin Ziegler)
comment:6 Changed 22 months ago by halostatue (Austin Ziegler)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Another option would be to create a parallel port
ruby-build-standalone
and modify theruby-build
port to depend onport:rbenv
andport:ruby-build-standalone
. That would satisfy my needs and keep the behaviour that some users may have come to expect over time because of this dependency.