<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/6faf3f82aafe5bb39ae1caa944b818dd571227fe">https://github.com/macports/macports-base/commit/6faf3f82aafe5bb39ae1caa944b818dd571227fe</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 6faf3f8 Use notes for startupitem loading information
</span>6faf3f8 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 6faf3f82aafe5bb39ae1caa944b818dd571227fe
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Sat Feb 17 05:19:14 2018 +1100
<span style='display:block; white-space:pre;color:#404040;'> Use notes for startupitem loading information
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> This way it isn't only printed once during the destroot phase (which
</span><span style='display:block; white-space:pre;color:#404040;'> meant users never saw it if they installed from an archive.)
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Fixes: https://trac.macports.org/ticket/31798
</span>---
src/port1.0/port.tcl | 2 +-
src/port1.0/portstartupitem.tcl | 56 +++++++++++++++++++++++++----------------
2 files changed, 35 insertions(+), 23 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port1.0/port.tcl b/src/port1.0/port.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 99381d8..7be94b3 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port1.0/port.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port1.0/port.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -47,7 +47,7 @@ namespace eval port {
</span> variable _callback_list
lappend _callback_list ${callback}
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Run the callbacks registered in the callback list. Called from
# macports1.0 in the child interpreter after evaluating the Portfile and
# the variants. Clears the list of callbacks.
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port1.0/portstartupitem.tcl b/src/port1.0/portstartupitem.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 26ea2a6..dea6d5b 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port1.0/portstartupitem.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port1.0/portstartupitem.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -124,12 +124,45 @@ proc portstartupitem::get_startupitem_type {} {
</span> return $type
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# Add user notes regarding any installed startupitem
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc portstartupitem::add_notes {} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global startupitem.create startupitem.autostart subport
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![tbool startupitem.create]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[exists notes]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # leave a blank line after the existing notes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ notes-append ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Add some information for the user to the port's notes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[tbool startupitem.autostart]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ notes-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "A startup item has been generated that will aid in\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ starting ${subport} with launchd. It will be enabled\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ automatically on activation. Execute the following\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ command to manually _disable_ it:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sudo port unload ${subport}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ notes-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "A startup item has been generated that will aid in\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ starting ${subport} with launchd. It is disabled\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ by default. Execute the following command to start it,\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and to cause it to launch at startup:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sudo port load ${subport}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Register the above procedure as a callback after Portfile evaluation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+port::register_callback portstartupitem::add_notes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> proc portstartupitem::startupitem_create_darwin_launchd {args} {
global UI_PREFIX prefix destroot destroot.keepdirs subport macosx_deployment_target \
startupitem.name startupitem.uniquename startupitem.plist startupitem.location \
startupitem.init startupitem.start startupitem.stop startupitem.restart startupitem.executable \
startupitem.pidfile startupitem.logfile startupitem.logevents startupitem.netchange \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- startupitem.install startupitem.autostart startupitem.debug
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ startupitem.install startupitem.debug
</span>
set scriptdir ${prefix}/etc/startup
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -340,27 +373,6 @@ proc portstartupitem::startupitem_create_darwin_launchd {args} {
</span> file mkdir "${destroot}/Library/${daemondest}"
ln -sf "${itemdir}/${plistname}" "${destroot}/Library/${daemondest}"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Emit some information for the user
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[tbool startupitem.autostart]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_notice "###########################################################"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_notice "# A startup item has been generated that will aid in"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_notice "# starting ${subport} with launchd. It will be enabled"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_notice "# automatically on activation. Execute the following"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_notice "# command to manually _disable_ it:"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_notice "#"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_notice "# sudo port unload ${subport}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_notice "###########################################################"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_notice "###########################################################"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_notice "# A startup item has been generated that will aid in"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_notice "# starting ${subport} with launchd. It is disabled"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_notice "# by default. Execute the following command to start it,"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_notice "# and to cause it to launch at startup:"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_notice "#"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_notice "# sudo port load ${subport}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_notice "###########################################################"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span> }
proc portstartupitem::startupitem_create {} {
</pre><pre style='margin:0'>
</pre>