Opened 14 years ago
Last modified 11 years ago
#27097 new defect
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: | cooljeanius (Eric Gallager) | |
Port: |
Description
TO REPRODUCE
- Install MacPorts 1.9.1
- Open the interactive 'port' shell by calling running 'port' from the Terminal.
- From the 'port' interactive shell run 'selfupdate'.
EXPECTED RESULT
- 'selfupdate' should recommend the user run 'upgrade outdated'.
ACTUAL RESULT
- '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 (3)
comment:1 Changed 14 years ago by jmroot (Joshua Root)
Component: | ports → base |
---|
comment:2 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
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.
Please remember to select the correct component.