mpkg/mdmg and scripts

Daniel J. Luke dluke at geeklair.net
Tue Jan 17 20:46:36 UTC 2017


On Jan 13, 2017, at 8:20 PM, Craig Treleaven <ctreleaven at macports.org> wrote:
>> On Jan 13, 2017, at 4:06 PM, Joshua Root <jmr at macports.org> wrote:
>> On 2017-1-14 07:28 , Daniel J. Luke wrote:
>>> On Jan 13, 2017, at 3:01 PM, Craig Treleaven <ctreleaven at macports.org> wrote:
>>>> Suppose I create an mpkg installer just for mariadb-server.  The scripts are included for the mariadb-server component, as expected.  However, when ‘port mpkg’ builds the installer component for the mariadb (client) software is ALSO includes the Pre/Postinstall scripts—it doesn’t know that they’re only intended for the server side.
>>> 
>>> Why does it do that?
>>> 
>>> To me, it seems like the simple solution would be for the scripts that pertain to mariadb-server to only be included with the mariadb-server port and not with the mariadb (client)  port.
>> 
>> I agree. Craig, it's not clear what exactly you are doing, so it's very difficult to say whether the result is correct or not.
> 
> As Ryan figured out, you can see the code related to mariadb-server in the ticket:
> 
> https://trac.macports.org/ticket/52144

initial thoughts:

- a quick hack would be to update the postinstall script so it doesn't matter if you try to run it more than once
- that postinstall script is confusing (why is it installing or chmod'ing files? why is it doing a launchctl load -w [we generally don't do that per policy]).

If there is a bug in the way we generate pkg or mpkgs that's causing the script to run too many times, that should be fixed.

> Is there some way to directly inspect the contents of an installer mpkg to verify if the scripts are improperly included in mythtv-core.28 and mariadb?

pkgutil / pacifist? 

-- 
Daniel J. Luke





More information about the macports-dev mailing list