Hi!

Concerning:
http://lists.macosforge.org/pipermail/macports-dev/2012-February/017914.html


Problem:

In Changeset 89994 on https://trac.macports.org/changeset/89994, 
trunk/base/src/macports1.0/macports.tcl
I see, that user's xcode 4.3 plist file 
${user_home}/Library/Preferences/com.apple.dt.Xcode.plist is copied to the new 
macports' home dir, having ${target_homedir} = ${prefix}/var/macports/home: 
${target_homedir}/Library/Preferences/com.apple.dt.Xcode.plist to be able to 
fulfill the new Licence agreement request of Xcode 4.3.

This supposes/implies the fact, that the _current_ user is that one user, who 
has to run Xcode before to generate a com.apple.dt.Xcode.plist file.
This supposes/implies further, that this _current_ user, who has to generate 
this particular com.apple.dt.Xcode.plist file has to be an admin user with 
privileged rights (admin). Because only this admin user with privileged 
permissions, per default is able to successfully run sudo and therefore is able 
to successfully is able to run macports via 'sudo port install…'.

As far as I understand the current state, the admin user is _forced_ to run 
Xcode 4.3 at least once to let create it a com.apple.dt.Xcode.plist file in the 
admin's preferences directory.
BUT: what if the user intentionally doesn't want to do that, wants to avoid 
that (for instance to avoid creation of unused files under an account he anyway 
never uses while working with Xcode) and intentionally wants to restrict this 
step to his preferred _un_privileged standard user, who later runs and uses 
Xcode 4.3 anyway on a regular basis?

So, this raises 2 questions to me:

Question 1:

What, if Xcode 4.3 is only installed/copied into its default location in 
/Applications by an admin user with privileged rights/permissions, but 
intentionally _NOT FIRST RUN_ and _NOT RUN_ later by this admin user? And only 
_FIRST RUN_ and _RUN_ and _used_ by an _un_privileged user (standard user), who 
doesn't run macports (because macports only is run only after role changing 
into admin's role and then run via sudo)?

Question 2:

>From _where_ does macports take/copy its com.apple.dt.Xcode.plist file, if run 
>in this very true-to-life situation (Xcode intentionally run (and run first) 
>by an unprivileged user, macports run via sudo by a privileged admin user)?
Wouldn't it be better to search for the existence of a com.apple.dt.Xcode.plist 
file not only in the _active_ user's preferences directory (admin user), but as 
well as in at least one more second (or all) unprivileged user's (standard 
user) preferences directory to fetch for a com.apple.dt.Xcode.plist file in 
case of no existence of this file in admin's user directory? So, wouldn't it be 
better to loop through _all_ existing users preferences directories below 
/Users to catch minimum one com.apple.dt.Xcode.plist file which will then be 
copied into macports' own new home directory?


Regards,
Sierk
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

Reply via email to