Re: port install v port mpkg | mdmg
On Aug 23, 2016, at 7:38 AM, Craig Treleaven wrote: > On Aug 22, 2016, at 11:21 AM, Ryan Schmidt wrote: > >> Craig, until base is fixed to automatically include daemondo in pkgs when >> needed, can't you just add a post-pkg block that copies daemondo from the >> location where it was installed by MacPorts base, without needing a separate >> MacPorts_daemondo port? > > “post-pkg” … I had no idea such a thing existed. I thought ‘port mpkg’ was > a command like ‘port cat’ or ‘port echo’; not a port phase. My handy search > facility (EasyFind) finds a grand total of 5 portfiles that implement such a > block. > > But that is clearly a much better solution than what I have always described > as a horrific hack, MacPorts_daemondo. I’ll try to figure out the process > over the next few days. pkg is a phase, like configure, build, destroot, it's just not one of the phases that runs unless you explicitly tell it to at the command line. Indeed there aren't many ports that augment that phase, since the defaults are enough to package most any port. And the only reason you want to augment it in your port is because of a MacPorts base bug, which is probably what we should work on fixing. > On a related topic, PackageMaker.app is becoming very difficult to find on > Apple’s Developer Connection website. Obviously because it was replaced by > pkgbuild about 6 years ago. Is it on someone’s ToDo list to update mpkg and > friends to use pkgbuild instead of PackageMaker? I’d like to help but I lack > a couple of key ingredients. Knowledge of OS X packaging and confidence to > hack base. Either of those could be solved in time…but that is something > else that is lacking for the forseeable future. Looks like we haven't done anything about it yet. The ticket (which I see you already found and Cc'd yourself on) is: https://trac.macports.org/ticket/42725 There's a link to a patch there, unfortunately the patch removes our existing Package Maker code and replaces it with pkgbuild code. We would want to keep the Package Maker code for older macOS versions. ___ macports-dev mailing list macports-dev@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-dev
Re: port install v port mpkg | mdmg
On Aug 12, 2016, at 5:30 AM, Rainer Müller wrote: > >> 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. That would be acceptable. > 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... No, I would not have MacPorts add a dependency on the port MacPorts_daemondo. The MacPorts_daemondo port should not exist. If a user installs it, they will get a message that it cannot be activated, except by being forced. If the user forces the activation, it will replace a part of MacPorts base. If they uninstall the port, that part of MacPorts base will be removed. We do not want to give users the opportunity to get themselves into this situation. Craig, until base is fixed to automatically include daemondo in pkgs when needed, can't you just add a post-pkg block that copies daemondo from the location where it was installed by MacPorts base, without needing a separate MacPorts_daemondo port? ___ macports-dev mailing list macports-dev@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-dev
Re: port install v port mpkg | mdmg
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 macports-dev@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-dev
port install v port mpkg | mdmg
Hi: 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’)? 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. So, can the port detect ‘port mpkg’ or ‘port mdmg’ and only add the dependency on MacPorts_daemondo in such cases? Thanks, Craig ___ macports-dev mailing list macports-dev@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-dev