Opened 23 months ago

Closed 15 months ago

Last modified 15 months ago

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

Change History (7)

comment:1 Changed 23 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 23 months ago by jmroot (Joshua Root)

Owner: set to mojca
Status: newassigned

comment:3 Changed 23 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 ./install.sh 
    2424destroot.env        PREFIX=${destroot}${prefix}
    2525
    2626depends_lib         port:rbenv
     27
     28variant 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 16 months ago by halostatue (Austin Ziegler)

I have implemented this both ways:

  • #16274, where rbenv now has a variant to add ruby-build and ruby-build no longer depends on rbenv. 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 installing rbenv. 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 15 months ago by halostatue (Austin Ziegler)

I have closed #16723 as it is not the correct fix. The only variant that I have provided is #16274.

Last edited 15 months ago by halostatue (Austin Ziegler) (previous) (diff)

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

Resolution: fixed
Status: assignedclosed

In aefe91ba783cc5aaa324d78b1c007d0996e9cfd2/macports-ports (master):

rbenv: update to version 1.2.0

Add a notes block advising the installation of port ruby-build if the
subcommand rbenv install is desired.

Closes: #65329
Signed-off-by: Austin Ziegler <austin@…>

comment:7 Changed 15 months ago by halostatue (Austin Ziegler)

In 3a8bfe43754ea70860a29af4041bae79075c91bb/macports-ports (master):

ruby-build: remove incorrect dependency

  • Removes the dependency on rbenv, as ruby-build does not require rbenv to work (but rbenv can integrate ruby-build as a plug-in).
  • Add a notes block that this port no longer installs port rbenv automatically, and advising manual installation of port rbenv.
  • Upgraded to ruby-build 20230208.

Closes: #65329
Closes: https://github.com/macports/macports-ports/pulls/16273
Closes: https://github.com/macports/macports-ports/pulls/16274
Signed-off-by: Austin Ziegler <austin@…>

Note: See TracTickets for help on using tickets.