Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#60454 closed enhancement (fixed)

Print a warning when users specify version/revision information at install time that will not be honored

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: Kurt Hindenburg <kurt.hindenburg@…>
Priority: Normal Milestone: MacPorts 2.7.0
Component: base Version: 2.6.2
Keywords: Cc: kurthindenburg (Kurt Hindenburg)
Port:

Description

Over the years, I've seen many instances of newbie MacPorts users issuing a command like (e.g. from comment:ticket:59904:3)

$ sudo port install gnutls @3.6.11.1

and expecting that MacPorts will install that version of the port, and being surprised when MacPorts silently installs a different version.

MacPorts should print a warning if a user requests a @version_revision specification when installing a port if that specification does not match the current version and revision of the port, since MacPorts will not honor it.

Change History (9)

comment:1 Changed 5 years ago by kurthindenburg (Kurt Hindenburg)

Cc: kurthindenburg added

I think this should be fatal so that the user has to remove the version. Otherwise, the user might not see the message and will still be confused.

I'm open to what the message should be.

% sudo port install xboard @4.9.3 
Error: /opt/local/bin/port: install ignores the provided version @4.9.3; remove it to continue.

comment:2 Changed 5 years ago by kurthindenburg (Kurt Hindenburg)

If you want to only note if the provided @version is different then the current port's version, I haven't determine how to do that and not sure if it is possible.

comment:3 in reply to:  2 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to kurthindenburg:

I think this should be fatal so that the user has to remove the version. Otherwise, the user might not see the message and will still be confused.

That sounds reasonable.

Replying to kurthindenburg:

If you want to only note if the provided @version is different then the current port's version, I haven't determine how to do that and not sure if it is possible.

On second thought, issuing the error regardless may be better. Otherwise the user may be confused why it "worked" some times and not others.

comment:5 Changed 4 years ago by kurthindenburg (Kurt Hindenburg)

Milestone: MacPorts Future

comment:6 Changed 4 years ago by Kurt Hindenburg <kurt.hindenburg@…>

Owner: set to Kurt Hindenburg <kurt.hindenburg@…>
Resolution: fixed
Status: newclosed

In 835a7db11d1b1b317860b6fbe69ad70fa7e161b1/macports-base (master):

For install action, abort if any @version is provided on command line

The install action has always ignored any @version provided on the
command line. This causes confusion for users so change to abort the
command and force user to remove the @version.

Closes: #60454

comment:7 Changed 4 years ago by Kurt Hindenburg <kurt.hindenburg@…>

In 889f25a90cab49720260942bbb85e45de959dcb9/macports-base (master):

For install action, abort if any @version is provided on command line (https://github.com/macports/macports-base/pull/174)

The install action has always ignored any @version provided on the
command line. This causes confusion for users so change to abort the
command and force user to remove the @version.

Closes: #60454

comment:8 Changed 4 years ago by kurthindenburg (Kurt Hindenburg)

This was changed in [ca071954d482c752b7ebddb802ef6cf421fa5512/macports-base] so the error messages are different.

comment:9 Changed 4 years ago by jmroot (Joshua Root)

Milestone: MacPorts FutureMacPorts 2.7.0
Note: See TracTickets for help on using tickets.