[38147] branches/gsoc08-privileges/base/src/port1.0/portutil.tcl

Paul Magrath pmagrath at macports.org
Wed Jul 9 01:14:37 PDT 2008


Not primarily no. Is there somewhere more appropriate for private  
functions in portutil?

On 8 Jul 2008, at 23:53, Ryan Schmidt wrote:

> Is this chown procedure intended to be used by ports?
>
> If so, maybe there should be chgrp and chmod procedures as well.
>
>
> On Jul 8, 2008, at 16:01, pmagrath at macports.org wrote:
>
>> Revision: 38147
>>          http://trac.macosforge.org/projects/macports/changeset/38147
>> Author:   pmagrath at macports.org
>> Date:     2008-07-08 14:01:25 -0700 (Tue, 08 Jul 2008)
>> Log Message:
>> -----------
>> Re-wrote chown proc to use fs-traverse (suggested by Eridius.  
>> Thanks!)
>>
>> Modified Paths:
>> --------------
>>    branches/gsoc08-privileges/base/src/port1.0/portutil.tcl
>>
>> Modified: branches/gsoc08-privileges/base/src/port1.0/portutil.tcl
>> ===================================================================
>> --- branches/gsoc08-privileges/base/src/port1.0/portutil.tcl	 
>> 2008-07-08 20:44:32 UTC (rev 38146)
>> +++ branches/gsoc08-privileges/base/src/port1.0/portutil.tcl	 
>> 2008-07-08 21:01:25 UTC (rev 38147)
>> @@ -2273,9 +2273,10 @@
>> 	file attributes $path -owner [name_to_uid "$user"]
>> 	
>>     if {[file isdirectory $path]} {
>> -		foreach g [glob [file join $path *]] {
>> -			chown $g $user
>> +		fs-traverse myfile ${path} {
>> +			file attributes $myfile -owner [name_to_uid "$user"]
>> 		}
>>     }
>> +
>> }
>



More information about the macports-dev mailing list