How to avoid Xcode license dance

Ryan Schmidt ryandesign at macports.org
Wed Jul 24 01:57:22 PDT 2013


On Jul 24, 2013, at 00:25, Lawrence Velázquez wrote:

> On Jul 23, 2013, at 10:15 AM, Ryan Schmidt wrote:
> 
>> On Jul 23, 2013, at 09:10, Ryan Schmidt wrote:
>> 
>>> Is there a way -- command line flag or environment variable maybe -- to instruct MacPorts not to do the Xcode license dance where it copies the Xcode plist? I'm having trouble writing a special script which runs multiple `port` commands in parallel because:
>>> 
>>> error deleting "/opt/local/var/macports/home/Library/Preferences/com.apple.dt.Xcode.plist"
>>> 
>>> because another process already deleted it.
>>> 
>>> Alternately, could we instruct MacPorts not to do the Xcode license thing for subcommands that don't have anything to do with Xcode, such as `port info` or `port distfiles`?
>> 
>> I think we must already be selective about this. My "portmylivecheck" script [1] already runs multiple "port livecheck" invocations in parallel without this problem. However my new script which should run multiple "port distfiles" invocations in parallel encountered this error.
>> 
>> [1] https://trac.macports.org/browser/users/ryandesign/scripts/portmylivecheck
> 
> I'm not too familiar with the plist-copying, but this seems to be where it's initiated:
> 
> https://trac.macports.org/browser/tags/release_2_2_0/base/src/macports1.0/macports.tcl#L1053

Thanks, that explains why my livecheck script was fine and my new script wasn't: the plist only gets copied if [getuid] is 0, and I was running my new script with sudo. So I'll need to figure out how to drop privileges while running parallel port commands so that they don't try to do Xcode plist stuff.


> And this is where it's actually done:
> 
> https://trac.macports.org/browser/tags/release_2_2_0/base/src/macports1.0/macports.tcl#L1189




More information about the macports-dev mailing list