Xcode 4.3: Apparently Persistent License Agreement

Joshua Root jmr at macports.org
Sun Mar 4 19:27:19 PST 2012


> [Harald Hanche-Olsen <hanche at math.ntnu.no> (2012-03-04 21:38:46 UTC)]
> 
>> [Harald Hanche-Olsen <hanche at math.ntnu.no> (2012-03-04 21:30:49 UTC)]
>> 
>> > How exactly does it determine where to copy the accepted license from?
>> 
>> I got it; by examining $HOME, which is not changed by sudo.
> 
> So here is a suggestion for making it more robust:
> 
> If no license agreement is found in $HOME/Library/Preferences, look
> instead in ~$SUDO_USER/Library/Preferences (probably not valid syntax,
> but I trust the intent is clear).

If you must use a root shell, you can record system-wide license
acceptance in /Library/Preferences by running 'xcodebuild -license' as root.

- Josh


More information about the macports-users mailing list