Strange error

Randall Wood rhwood at mac.com
Sun May 13 17:47:01 PDT 2007


On 13 May 2007, at 20:09, James Berry wrote:

>
> Hey Randall,
>
> On May 13, 2007, at 11:34 AM, Randall Wood wrote:
>
>> My $HOME environment variable is correctly set, but the Security  
>> Frameworks do not set this variable. When I 'sudo port ...' it works.
>
> Does this occur because you're invoking the darwinports framework  
> directly without going through a shell which would otherwise be  
> setting HOME?

It occurs when running port from Pallet, my attempt to write a GUI  
for macports.

> I'm not quite sure what to do about this issue. I did make a small  
> change to the code to call file normalize instead of relying on the  
> file name handling to do the conversion, but it looks to me like it  
> boils down to the same thing in the end.
>
> One possibility is that (since we know we're on a mac), we could  
> just set $HOME based on the uid, if it's not set. This seems  
> fraught with a bit of peril. Another possibility might be to just  
> require that HOME be set, pushing the problem back into your court.  
> If you're invoking through the darwinports api, can you set HOME  
> prior to init? Other ideas?
>
>> BTW: port creates the ~/.macports directory with root ownership,  
>> but should create it with the same ownership as the $HOME directory.
>
> I guess I have two choices:
>
> 	(1) Always create the directory with ownership its parent directory
>
> 	(2) Always create the directory with ownership of the uid, rather  
> than euid.
>
> #1 is probably better. Anybody else?

I think we should go with #1.

> James


Randall Wood
rhwood at mac.com
http://shyramblings.blogspot.com

"The rules are simple: The ball is round. The game lasts 90 minutes.  
All the
rest is just philosophy."





More information about the macports-dev mailing list