~/.macports
Ryan Schmidt
ryandesign at macports.org
Tue Feb 10 17:30:59 PST 2015
On Feb 10, 2015, at 5:47 AM, Clemens Lang wrote:
> On 10 Feb, 2015, at 11:37, René J.V. Bertin wrote:
>
>> As I said, my ~/.macports on my Mac appears to be unused since november 2013 or
>> so. However, the tiny test install I have on my Linux system does contain a lot
>> of things that appear to be copies, but also things like "home" the function of
>> which is unclear to me.
>
> ~/.macports is used instead of /opt/local/var/macports when you run MacPorts in
> a root installation but without root privileges. As such, MacPorts will put
> downloaded tarballs, work directories and build support files there when you,
> for example, run
> port build qt4-mac # note the lack of sudo
This "feature" was added at some point. I never want this behavior, so I ensured that it never takes place on my system using "chmod 000 ~/.macports/{opt,Users}". Now, if I ever forget to use sudo, I just get a permission denied error, like I used to before this feature was added, thus reminding me that I need to use sudo.
I've also made additional changes to make it impossible for me to forget to use sudo:
On Feb 10, 2015, at 11:32 AM, René J.V. Bertin wrote:
> On Tuesday February 10 2015 17:10:37 Chris Jones wrote:
>
>> 1) at least is solvable as you can configure your sudoers list to allow
>> your main user to run your port command (and that command only) through
>> sudoers without requiring a password.
>
> I know that, but for some reason I've never managed to get that to work following just the instructions in the file. I'm sure I must have been doing something wrong, but in practice it was just as easy, for individual commands, to make a wrapper that prepends sudo.
You're talking about two different things.
Chris is talking about the fact that when you run a command with "sudo", it asks you for your password (unless you've run another command using "sudo" within the past 5 minutes). This is solvable by editing the sudoers file as has already been explained.
René, you're talking about the inconvenience of having to type "sudo" at the command line. That can be fixed in your bash startup file using:
alias port="sudo port"
More information about the macports-dev
mailing list