[MacPorts] #44295: Attempting to add more than one LaunchItem
#44295: Attempting to add more than one LaunchItem ---------------------+-------------------------------- Reporter: cr@… | Owner: macports-tickets@… Type: request | Status: new Priority: High | Milestone: Component: ports | Version: 2.3.1 Keywords: | Port: salt ---------------------+-------------------------------- Greetings, I am updating the Portfile for Salt. I'm trying to add two variants--"master" and "minion". The default is "minion". Both variants have a startupitem, but at the end of the install (port install salt +master +minion) I get {{{ ---> Fetching distfiles for salt ---> Verifying checksums for salt ---> Extracting salt ---> Configuring salt ---> Building salt ---> Staging salt into destroot ---> Creating launchd control script ########################################################### # A startup item has been generated that will aid in # starting salt with launchd. It is disabled # by default. Execute the following command to start it, # and to cause it to launch at startup: # # sudo port load salt ###########################################################\ }}} but my Portfile says {{{ [...] default_variants +minion variant minion { startupitem.create yes startupitem.name salt-minion startupitem.netchange yes startupitem.logevents yes startupitem.logfile ${prefix}/var/log/salt/minion startupitem.executable ${prefix}/bin/salt-minion if ![file exists /opt/local/etc/salt/minion] { file copy ${worksrcpath}/conf/minion /opt/local/etc/salt } } variant master { startupitem.create yes startupitem.name salt-master startupitem.netchange yes startupitem.logevents yes startupitem.logfile ${prefix}/var/log/salt/master startupitem.executable ${prefix}/bin/salt-master [...] }}} and 'port load salt' returns {{{ port load salt Error: org.macports.load for port salt returned: Launchd plist /Library/LaunchDaemons/org.macports.salt-minion.plist was not found }}} and indeed only org.macports.salt-master.plist is present in /Library/LaunchDaemons. So can I not put startup item directives in a variant? -- Ticket URL: <https://trac.macports.org/ticket/44295> MacPorts <http://www.macports.org/> Ports system for OS X
#44295: support more than one launchd plist --------------------------+-------------------------------- Reporter: cr@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: base | Version: 2.3.1 Resolution: | Keywords: Port: | --------------------------+-------------------------------- Changes (by ryandesign@…): * priority: High => Normal * type: request => enhancement * component: ports => base * port: salt => Comment: Yes, you can put startupitem directives in variants. However, it is usually best not to do so because "port load" and "port unload" would not work seamlessly, and furthermore, MacPorts base does not currently have the capability for creating more than one launchd plist in a single port. Of course you can manually create any file and copy it where it needs to go. However, consider whether master and minion might best be implemented as subports. -- Ticket URL: <https://trac.macports.org/ticket/44295#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#44295: support more than one launchd plist --------------------------+-------------------------------- Reporter: cr@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: base | Version: 2.3.1 Resolution: | Keywords: Port: | --------------------------+-------------------------------- Comment (by cr@…): Replying to [comment:1 ryandesign@…]:
However, consider whether master and minion might best be implemented as subports.
That sounds good, is there documentation on how subport works? I tried replacing 'variant minion' with 'subport salt-minion' but that doesn't seem to generate the desired result. -- Ticket URL: <https://trac.macports.org/ticket/44295#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts