[89656] trunk/base
pixilla at macports.org
pixilla at macports.org
Sun Feb 5 15:04:28 PST 2012
Revision: 89656
http://trac.macports.org/changeset/89656
Author: pixilla at macports.org
Date: 2012-02-05 15:04:25 -0800 (Sun, 05 Feb 2012)
Log Message:
-----------
base/:
- Add startupitem_install var to control the creation of startupitem symlinks in
/Libraray/LaunchAgents or /Libraray/LaunchDaemons.
Modified Paths:
--------------
trunk/base/doc/macports.conf.in
trunk/base/src/macports1.0/macports.tcl
trunk/base/src/port1.0/portdestroot.tcl
trunk/base/src/port1.0/portstartupitem.tcl
Modified: trunk/base/doc/macports.conf.in
===================================================================
--- trunk/base/doc/macports.conf.in 2012-02-05 22:23:33 UTC (rev 89655)
+++ trunk/base/doc/macports.conf.in 2012-02-05 23:04:25 UTC (rev 89656)
@@ -106,6 +106,12 @@
# are installed.
#startupitem_type default
+# Option to install symlinks into /Libraray/LaunchAgents or /Libraray/LaunchDaemons
+# startupitem_install may be empty, "yes" or "no";
+# if the option is NOT "no" then a simlink for the startupitem will be created in
+# the appropriate system directory.
+#startupitem_install yes
+
# Extra environment variables to keep. Any variables listed here are added
# to the list of variables that are not removed from the environment used
# while processing ports. As with binpath, setting extra_env is intended for
Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl 2012-02-05 22:23:33 UTC (rev 89655)
+++ trunk/base/src/macports1.0/macports.tcl 2012-02-05 23:04:25 UTC (rev 89656)
@@ -45,7 +45,7 @@
portdbpath libpath binpath auto_path extra_env sources_conf prefix portdbformat \
portarchivetype portautoclean \
porttrace portverbose keeplogs destroot_umask variants_conf rsync_server rsync_options \
- rsync_dir startupitem_type place_worksymlink xcodeversion xcodebuildcmd \
+ rsync_dir startupitem_type startupitem_install place_worksymlink xcodeversion xcodebuildcmd \
mp_remote_url mp_remote_submit_url configureccache ccache_dir ccache_size configuredistcc configurepipe buildnicevalue buildmakejobs \
applications_dir frameworks_dir developer_dir universal_archs build_arch macosx_deployment_target \
macportsuser proxy_override_env proxy_http proxy_https proxy_ftp proxy_rsync proxy_skip \
@@ -57,7 +57,7 @@
portdbpath porturl portpath portbuildpath auto_path prefix prefix_frozen portsharepath \
registry.path registry.format \
portarchivetype archivefetch_pubkeys portautoclean porttrace keeplogs portverbose destroot_umask \
- rsync_server rsync_options rsync_dir startupitem_type place_worksymlink macportsuser \
+ rsync_server rsync_options rsync_dir startupitem_type startupitem_install place_worksymlink macportsuser \
mp_remote_url mp_remote_submit_url configureccache ccache_dir ccache_size configuredistcc configurepipe buildnicevalue buildmakejobs \
applications_dir current_phase frameworks_dir developer_dir universal_archs build_arch \
os_arch os_endian os_version os_major os_platform macosx_version macosx_deployment_target $user_options"
@@ -771,6 +771,11 @@
set macports::startupitem_type "default"
}
+ # Set whether startupitems are symlinked into system directories
+ if {![info exists macports::startupitem_install]} {
+ set macports::startupitem_install yes
+ }
+
# Default place_worksymlink
if {![info exists macports::place_worksymlink]} {
set macports::place_worksymlink yes
Modified: trunk/base/src/port1.0/portdestroot.tcl
===================================================================
--- trunk/base/src/port1.0/portdestroot.tcl 2012-02-05 22:23:33 UTC (rev 89655)
+++ trunk/base/src/port1.0/portdestroot.tcl 2012-02-05 23:04:25 UTC (rev 89656)
@@ -53,7 +53,7 @@
options startupitem.name startupitem.start startupitem.stop startupitem.restart
options startupitem.type startupitem.executable
options startupitem.pidfile startupitem.logfile startupitem.logevents startupitem.netchange
-options startupitem.uniquename startupitem.plist startupitem.location
+options startupitem.uniquename startupitem.plist startupitem.location startupitem.install
commands destroot
# Set defaults
@@ -85,6 +85,7 @@
default startupitem.logfile ""
default startupitem.logevents no
default startupitem.netchange no
+default startupitem.install {$system_options(startupitem_install)}
set_ui_prefix
Modified: trunk/base/src/port1.0/portstartupitem.tcl
===================================================================
--- trunk/base/src/port1.0/portstartupitem.tcl 2012-02-05 22:23:33 UTC (rev 89655)
+++ trunk/base/src/port1.0/portstartupitem.tcl 2012-02-05 23:04:25 UTC (rev 89656)
@@ -400,6 +400,7 @@
global startupitem.name startupitem.uniquename startupitem.plist startupitem.location
global startupitem.init startupitem.start startupitem.stop startupitem.restart startupitem.executable
global startupitem.pidfile startupitem.logfile startupitem.logevents startupitem.netchange
+ global startupitem.install
set scriptdir ${prefix}/etc/startup
@@ -602,8 +603,8 @@
close ${plist}
- # Make a symlink to the plist file
- if {[getuid] == 0} {
+ if { [getuid] == 0 &&
+ ${startupitem.install} != "no" } {
file mkdir "${destroot}/Library/${daemondest}"
ln -sf "${itemdir}/${plistname}" "${destroot}/Library/${daemondest}"
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120205/9df793f1/attachment.html>
More information about the macports-changes
mailing list