Opened 5 years ago
Last modified 5 years ago
#59836 new enhancement
port should explicitly say to use sudo when upgrading
Reported by: | manulcaux | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | base | Version: | 2.6.2 |
Keywords: | Cc: | ||
Port: |
Description (last modified by mf2k (Frank Schima))
I just wanted to keep my port installation up to date and operate as usual, i.e. first update MacPorts and then upgrade outdated ports.
Here is the messages I got :
[Emmanuels:/Applications/cassis5.1last] caux% sudo port selfupdate Password: ---> Updating MacPorts base sources using rsync MacPorts base version 2.6.2 installed, MacPorts base version 2.6.2 downloaded. ---> Updating the ports tree ---> MacPorts base is already the latest version The ports tree has been updated. To upgrade your installed ports, you should run port upgrade outdated [Emmanuels:/Applications/cassis5.1last] caux% port upgrade outdated Error: Follow https://guide.macports.org/#project.tickets to report a bug. [Emmanuels:/Applications/cassis5.1last] caux%
In fact, it works if I type
sudo port upgrade outdated
this should be made clear that sudo is mandatory, first in the output message given after the selupdate, and second in the error message sent if the user forgot to use sudo !
And why the sudo is not taken by default when I used it a few second before launching sudo port self update ??
Change History (4)
comment:1 Changed 5 years ago by mf2k (Frank Schima)
comment:2 Changed 5 years ago by mf2k (Frank Schima)
Component: | ports → base |
---|---|
Description: | modified (diff) |
Keywords: | upgrade removed |
Port: | all removed |
Summary: | Impossible to upgrade my ports with error not giving any clue to search why... → port should explicitly say when to use sudo when upgrading |
Type: | defect → enhancement |
comment:3 Changed 5 years ago by mf2k (Frank Schima)
Summary: | port should explicitly say when to use sudo when upgrading → port should explicitly say to use sudo when upgrading |
---|
comment:4 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to manulcaux:
this should be made clear that sudo is mandatory, first in the output message given after the selupdate,
Although we do not recommend it (because it is less secure), it is possible to configure MacPorts as a non-root installation. In that case, sudo is not used. So what you are asking for here is for us to identify all the places where we advise the user to use sudo (or don't advise the user to use sudo and should, as you encountered here), but conditionalize that based on whether the user has a root installation or a non-root installation. That's probably several places within MacPorts base, and countless places within individual ports.
and second in the error message sent if the user forgot to use sudo !
I agree, it should print something useful. I don't know why it does not.
And why the sudo is not taken by default when I used it a few second before launching sudo port self update ??
Because that is not how a shell works. MacPorts has no influence over the shell that you run it in.
In the future, please use WikiFormatting.