Hello, 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 [1] where the list of dependencies is generated. If the port to be packaged has a startupitem, additionally include MacPorts_daemondo in the result list. Of course MacPorts_daemondo itself would still be a hack and require force activation... Rainer [1] https://trac.macports.org/browser/trunk/base/src/package1.0/portmpkg.tcl?rev=134837#L61 _______________________________________________ macports-dev mailing list [email protected] https://lists.macosforge.org/mailman/listinfo/macports-dev
