Opened 8 years ago
Closed 8 years ago
#53351 closed defect (fixed)
shared-mime-info: support mpgk/mdmg packaging
Reported by: | ctreleaven (Craig Treleaven) | Owned by: | rjvb |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | mkae (Marko Käning) | |
Port: | shared-mime-info |
Description
Patch adds a postinstall script, etc, that mimics the existing post-activate step (which initializes or updates the mime info database.
Tested by creating and installing an mpkg of shared-mime-info. Installer log attached showing successful completion.
See also #44165. This contributed to the problems with a gtk2 installer.
Attachments (2)
Change History (11)
Changed 8 years ago by ctreleaven (Craig Treleaven)
Attachment: | patch_port_shared-mime-info_support_packaging.diff added |
---|
Changed 8 years ago by ctreleaven (Craig Treleaven)
Attachment: | Installer Log 18-Jan-2017.txt added |
---|
comment:1 Changed 8 years ago by mkae (Marko Käning)
comment:2 Changed 8 years ago by ctreleaven (Craig Treleaven)
Yeah, it would be nice but it sure would not be a lot of work. Luckily, only a few ports have post-activate actions. The program that shared-mime-info calls is not complicated so it is pretty easy to duplicate with a postinstall script.
I'll make the same changes that Ryan asked for in #53350. May I commit after that?
comment:3 follow-up: 4 Changed 8 years ago by RJVB (René Bertin)
This seems to change something only when using packaging, so as far as I'm concerned you can go ahead.
KF5 ports will have a post-activate action defined in the PortGroup, may I assume that we'll if and when you'll be wanting to package them (supposing they ever get published)?
comment:4 follow-up: 5 Changed 8 years ago by ctreleaven (Craig Treleaven)
Replying to RJVB:
This seems to change something only when using packaging, so as far as I'm concerned you can go ahead.
KF5 ports will have a post-activate action defined in the PortGroup, may I assume that we'll if and when you'll be wanting to package them (supposing they ever get published)?
Sorry, is there a word missing in the second sentence ("we'll ... if")? I don't have a reason to package KF5.
Without looking at the PortGroup, perhaps the script(s) just need to be added to whatever is the base port that the others will always include. Ie any port that has a dependency on shared-mime-info will (if packaged) 'inherit' the above postinstall script. For example, a stand-alone installer for gramps3 (the genealogy program) will include a mime database update 'for free'.
comment:5 Changed 8 years ago by RJVB (René Bertin)
Replying to ctreleaven:
Sorry, is there a word missing in the second sentence ("we'll ... if")? I don't have a reason to package KF5.
Yes, "we'll see ... if". Sorry about that.
Without looking at the PortGroup, perhaps the script(s) just need to be added to whatever is the base port that the others will always include.
Yes, that would make sense of course. Not the base port in this case, but the subport that installs the command that's run as the post-activate action.
Ie any port that has a dependency on shared-mime-info will (if packaged) 'inherit' the above postinstall script. For example, a stand-alone installer for gramps3 (the genealogy program) will include a mime database update 'for free'.
I haven't tried to figure out how that works, presumably because package.dir
is actually a port-specific location under ${prefix}? If not I don't see where the postinstall script is installed so that other ports can invoke it. Unless this is automatic because the installer for any port depending on shared-mime-info will include a shared-mime-info installer?
If that's how it works, would that also prevent the "issue" that not every port depending on shared-mime-info needs to provoke a database update, because the shared-mime-info installer won't be run if the port is already installed?
comment:6 Changed 8 years ago by ctreleaven (Craig Treleaven)
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:7 Changed 8 years ago by mkae (Marko Käning)
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:8 Changed 8 years ago by mkae (Marko Käning)
Cc: | mkae added |
---|---|
Owner: | changed from mkae, rjvbertin@… to rjvb |
Status: | reopened → assigned |
comment:9 Changed 8 years ago by mkae (Marko Käning)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
This looks like an unnecessary duplication of functionality of
pre-activate
which should be handled byport
itself. This way it looks like a workaround...Would be cool if MacPorts would support this out-of-the-box without the need for such tweaking.