port install v port mpkg | mdmg
raimue at macports.org
Fri Aug 12 03:30:47 PDT 2016
On 2016-08-10 17:23, Craig Treleaven wrote:
> Is it possible for a port to take different actions depending on
> whether the user has initiated ‘port install’ v. 'port mpkg’ (or
> ‘port mdmg’)?
Unfortunately, no, as all phases can be run individually. So up to the
destroot phase, there is no knowledge whether the following step would
be install or mpkg.
> My mythtv-pkg.27 is intended to be used to create an all-in-one
> installer package for MythTV. I have a VM with a custom prefix for
> this. The resulting mpkg needs daemondo, so I created the nasty hack
> in MacPorts_daemondo. However, mythtv-pkg.27 could be a nice
> shortcut for a MacPorts user that wants to install a complete MythTV
> system in one go. In such case, they don’t need MacPorts_daemondo.
One solution for this could be in base to automatically include daemondo
in the mpkg when it is used by the port being packaged.
See portmpkg::make_dependency_list in src/package1.0/portmpkg.tcl 
where the list of dependencies is generated. If the port to be packaged
has a startupitem, additionally include MacPorts_daemondo in the result
Of course MacPorts_daemondo itself would still be a hack and require
More information about the macports-dev