New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #27097 (new defect)

Opened 3 years ago

Last modified 2 years ago

program suggests running 'port xxx' from within the 'port' interactive shell

Reported by: gba@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 1.9.1
Keywords: Cc:
Port:

Description

TO REPRODUCE

  1. Install MacPorts 1.9.1
  2. Open the interactive 'port' shell by calling running 'port' from the Terminal.
  3. From the 'port' interactive shell run 'selfupdate'.

EXPECTED RESULT

  1. 'selfupdate' should recommend the user run 'upgrade outdated'.

ACTUAL RESULT

  1. 'selfupdate' recommends the user run 'port upgrade outdated'.

LOG

[Users/gba] > selfupdate
--->  Updating the ports tree
--->  Updating MacPorts base sources using rsync
MacPorts base version 1.9.1 installed,
MacPorts base version 1.9.1 downloaded.
--->  MacPorts base is already the latest version

The ports tree has been updated. To upgrade your installed ports, you should run
  port upgrade outdated
[Users/gba] > port upgrade outdated
Unrecognized action "port"

NOTES

While not entirely the end of the world, even a non-naive person like myself copy and pasted 'port upgrade outdated' verbatim back into the interactive shell. While I realize the expected behavior is to eliminate 'port' at the beginning of the command when running from within the interactive shell, perhaps the shell itself could interpret this and not prepend recommended commands with 'port'?

Change History

comment:1 Changed 3 years ago by jmr@…

  • Component changed from ports to base

Please remember to select the correct component.

comment:2 Changed 2 years ago by ryandesign@…

Yup. I'm not sure we can fully solve the problem, at least not easily, since it goes deeper than just that:

There's also the problem that the user is sometimes told to "sudo port" something, even if the user's MacPorts installation is not running as root.

And of course, these issues are not limited to MacPorts base -- several individual ports also tell users to run some port command, and they have no idea whether MacPorts is running interactively or not, or as root or a regular user, so most of them probably tell the user to run "sudo port" even if that's not quite right.

If we want to consider the case of MacPorts GUI clients like Pallet, then it gets tougher still, because the user won't be typing in any commands at all; they'll be clicking GUI buttons representing those tasks. In this case, I guess the user is currently expected to either copy/paste the given command into a Terminal, or dissect it and figure out how to map its intent to the GUI.

Note: See TracTickets for help on using tickets.