Re: startupitem issue with unmounted volume (non-default prefix)

2015-07-25 Thread Craig Treleaven
> On Jul 24, 2015, at 10:48 PM, Joshua Root  wrote:
> 
> On 2015-7-25 09:59 , Ryan Schmidt wrote:
>> 
>>> On Jul 21, 2015, at 9:04 PM, Daniel J. Luke wrote:
 On Jul 21, 2015, at 7:27 PM, Ryan Schmidt wrote:
> ok, so we should probably be copying the plist (instead of symlinking it 
> - which is a lesson we should have already learned from back in the 
> ‘images’ days) - and we likely also want something like the above.
 
 I don't remember: any reason why we need a copy/symlink there? Why can't 
 we just put the plist there (and only there)?
>>> 
>>> I believe it was a desire to have everything in $prefix (and maybe to 
>>> facilitate when people have more than one install in different prefixes?)
>> 
>> But if you have multiple installs, you already have to set 
>> "startupitem_install no" and "startupitem_type none" in macports.conf on all 
>> but one of them. There would be no significant difference if we were to 
>> change MacPorts to install the plist file to its final destination directly, 
>> rather than to put a symlink there.
> 
> What we should do is:
> * Never put anything in /Library/LaunchDaemons at destroot time
> * If $startupitem_install is true at activate time, hard-link or copy
> (depending on if the volumes differ) the plist to /Library/LaunchDaemons
> * Record that we did that so it can be removed at deactivate time
> 
> - Josh
From a selfish point of view, I would like to see this work better in case of 
mdmv/mpkg installers.  Currently, my installer for MythTV includes launchd 
plists for MythTV, MariaDB and logrotate.  The dmg installer doesn’t put the 
plist in the right place for any of those.  (There are no activate or 
deactivate stages in such cases.)  My workaround depends on running a script 
after the install.

Craig

___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: startupitem issue with unmounted volume (non-default prefix)

2015-07-24 Thread Joshua Root
On 2015-7-25 09:59 , Ryan Schmidt wrote:
> 
>> On Jul 21, 2015, at 9:04 PM, Daniel J. Luke wrote:
>>> On Jul 21, 2015, at 7:27 PM, Ryan Schmidt wrote:
 ok, so we should probably be copying the plist (instead of symlinking it - 
 which is a lesson we should have already learned from back in the ‘images’ 
 days) - and we likely also want something like the above.
>>>
>>> I don't remember: any reason why we need a copy/symlink there? Why can't we 
>>> just put the plist there (and only there)?
>>
>> I believe it was a desire to have everything in $prefix (and maybe to 
>> facilitate when people have more than one install in different prefixes?)
> 
> But if you have multiple installs, you already have to set 
> "startupitem_install no" and "startupitem_type none" in macports.conf on all 
> but one of them. There would be no significant difference if we were to 
> change MacPorts to install the plist file to its final destination directly, 
> rather than to put a symlink there.

What we should do is:
* Never put anything in /Library/LaunchDaemons at destroot time
* If $startupitem_install is true at activate time, hard-link or copy
(depending on if the volumes differ) the plist to /Library/LaunchDaemons
* Record that we did that so it can be removed at deactivate time

- Josh
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: startupitem issue with unmounted volume (non-default prefix)

2015-07-24 Thread Ryan Schmidt

> On Jul 21, 2015, at 9:04 PM, Daniel J. Luke wrote:
>> On Jul 21, 2015, at 7:27 PM, Ryan Schmidt wrote:
>>> ok, so we should probably be copying the plist (instead of symlinking it - 
>>> which is a lesson we should have already learned from back in the ‘images’ 
>>> days) - and we likely also want something like the above.
>> 
>> I don't remember: any reason why we need a copy/symlink there? Why can't we 
>> just put the plist there (and only there)?
> 
> I believe it was a desire to have everything in $prefix (and maybe to 
> facilitate when people have more than one install in different prefixes?)

But if you have multiple installs, you already have to set "startupitem_install 
no" and "startupitem_type none" in macports.conf on all but one of them. There 
would be no significant difference if we were to change MacPorts to install the 
plist file to its final destination directly, rather than to put a symlink 
there.


___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: startupitem issue with unmounted volume (non-default prefix)

2015-07-21 Thread Daniel J. Luke
> On Jul 21, 2015, at 7:27 PM, Ryan Schmidt  wrote:
>> ok, so we should probably be copying the plist (instead of symlinking it - 
>> which is a lesson we should have already learned from back in the ‘images’ 
>> days) - and we likely also want something like the above.
> 
> I don't remember: any reason why we need a copy/symlink there? Why can't we 
> just put the plist there (and only there)?

I believe it was a desire to have everything in $prefix (and maybe to 
facilitate when people have more than one install in different prefixes?)

--
Daniel J. Luke  
 
++  
  
| * dl...@geeklair.net * |  

| *-- http://www.geeklair.net -* |  

++  
  
|   Opinions expressed are mine and do not necessarily   |  

|  reflect the opinions of my employer.  |  

++



___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: startupitem issue with unmounted volume (non-default prefix)

2015-07-21 Thread Ryan Schmidt

> On Jul 21, 2015, at 5:07 PM, Daniel J. Luke wrote:
> 
>> On Jul 20, 2015, at 5:25 PM, Brandon Allbery wrote:
>> 
>> 
>> On Mon, Jul 20, 2015 at 5:19 PM, Daniel J. Luke  wrote:
>> Maybe we should add something like:
>> 
>>KeepAlive
>>
>>PathState
>>
>>$prefix
>>
>>
>>
>> 
>> to our auto-generated plists? (I /think/ that will make launchd wait until 
>> $prefix is available, but haven’t tested it yet).
>> 
>> The problem is that MacPorts installs the plists themselves as symlinks 
>> under $prefix. They can't be resolved if $prefix hasn't been mounted yet.
> 
> ok, so we should probably be copying the plist (instead of symlinking it - 
> which is a lesson we should have already learned from back in the ‘images’ 
> days) - and we likely also want something like the above.

I don't remember: any reason why we need a copy/symlink there? Why can't we 
just put the plist there (and only there)?


___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: startupitem issue with unmounted volume (non-default prefix)

2015-07-21 Thread Daniel J. Luke
> On Jul 20, 2015, at 5:25 PM, Brandon Allbery  wrote:
> 
> 
> On Mon, Jul 20, 2015 at 5:19 PM, Daniel J. Luke  wrote:
> Maybe we should add something like:
> 
> KeepAlive
> 
> PathState
> 
> $prefix
> 
> 
> 
> 
> to our auto-generated plists? (I /think/ that will make launchd wait until 
> $prefix is available, but haven’t tested it yet).
> 
> The problem is that MacPorts installs the plists themselves as symlinks under 
> $prefix. They can't be resolved if $prefix hasn't been mounted yet.

ok, so we should probably be copying the plist (instead of symlinking it - 
which is a lesson we should have already learned from back in the ‘images’ 
days) - and we likely also want something like the above.

--
Daniel J. Luke  
 
++  
  
| * dl...@geeklair.net * |  

| *-- http://www.geeklair.net -* |  

++  
  
|   Opinions expressed are mine and do not necessarily   |  

|  reflect the opinions of my employer.  |  

++




___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: startupitem issue with unmounted volume (non-default prefix)

2015-07-20 Thread Ryan Schmidt

On Jul 20, 2015, at 4:19 PM, Daniel J. Luke wrote:

> I looked but didn’t see a ticket for this (can someone point me to it if you 
> happen to know it exists?)
> 
> Maybe we should add something like:
> 
>KeepAlive
>
>PathState
>
>$prefix
>
>
>
> 
> to our auto-generated plists? (I /think/ that will make launchd wait until 
> $prefix is available, but haven’t tested it yet).

Yes I think we discussed this before, and IIRC something like that was going to 
be the solution. I haven't looked into it yet though.


___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: startupitem issue with unmounted volume (non-default prefix)

2015-07-20 Thread Brandon Allbery
On Mon, Jul 20, 2015 at 5:19 PM, Daniel J. Luke  wrote:

> Maybe we should add something like:
>
> KeepAlive
> 
> PathState
> 
> $prefix
> 
> 
> 
>
> to our auto-generated plists? (I /think/ that will make launchd wait until
> $prefix is available, but haven’t tested it yet).
>

The problem is that MacPorts installs the plists themselves as symlinks
under $prefix. They can't be resolved if $prefix hasn't been mounted yet.

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev