Opened 6 months ago

Last modified 6 months ago

#65329 assigned defect

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


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 
    2222build {}
    2323destroot.cmd        ./
    2424destroot.env        PREFIX=${destroot}${prefix}
    26 depends_lib         port:rbenv

Change History (3)

comment:1 Changed 6 months ago by halostatue (Austin Ziegler)

Another option would be to create a parallel port ruby-build-standalone and modify the ruby-build port to depend on port:rbenv and port: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.

comment:2 Changed 6 months ago by jmroot (Joshua Root)

Owner: set to mojca
Status: newassigned

comment:3 Changed 6 months 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 ./ 
    2424destroot.env        PREFIX=${destroot}${prefix}
    2626depends_lib         port:rbenv
     28variant standalone description {Installs ruby-build without also installing rbenv} {
     29    depends_lib-delete port:rbenv

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).

Note: See TracTickets for help on using tickets.