Sudo: needed?
Ryan Schmidt
ryandesign at macports.org
Tue Feb 12 22:26:26 PST 2013
On Feb 12, 2013, at 08:00, Brandon Allbery wrote:
> On Tue, Feb 12, 2013 at 8:17 AM, Eneko Gotzon Ares wrote:
>> Upgrading kdelibs4 port this note is displayed:
>> # An agent to provide communication between KDE programs must be started.
>> # To start it run the following command:
>> # launchctl load -w /Library/LaunchAgents/org.macports.kdecache.plist
>>
>> That command:
>> ·Must be preceded by a "sudo" code? (i.e., sudo launchctl load -w /Library/LaunchAgents/org.macports.kdecache.plist).
>> ·When that "sudo" code is needed, the messages of the Terminal always express it explicitly?
>
> The latter.
In this case, the command must not be run with "sudo". However, not all MacPorts messages preface the command with "sudo" when doing so is required.
For example, when you run selfupdate, MacPorts prints the message:
The ports tree has been updated. To upgrade your installed ports, you should run
port upgrade outdated
This message assumes you understand that, if your MacPorts is installed as root (as most MacPorts installations are, unless you configured from source using the --with-install-user and --with-install-group arguments set to another user and group), then you must use "sudo" (or already be root e.g. with "sudo -s").
I'd love to see MacPorts base figure out whether it's running as root and adjust the message accordingly, but it doesn't do that yet.
More information about the macports-users
mailing list