[MacPorts] #45396: shared-mime-info @1.3 update-mime-database output is not removed on deactivate

MacPorts noreply at macports.org
Wed May 31 13:14:13 UTC 2023


#45396: shared-mime-info @1.3 update-mime-database output is not removed on
deactivate
-------------------------------+--------------------
  Reporter:  bgilbert          |      Owner:  RJVB
      Type:  defect            |     Status:  closed
  Priority:  Normal            |  Milestone:
 Component:  ports             |    Version:
Resolution:  fixed             |   Keywords:
      Port:  shared-mime-info  |
-------------------------------+--------------------

Comment (by mascguy):

 Replying to [comment:18 neverpanic]:
 > I vaguely recall that other linux distributions use triggers to handle
 this sort of problem, i.e., any package that installs a file in a certain
 path eventually triggers an update of the cache database at the end of the
 operation. Maybe it's time to add such a mechanism to MacPorts? On the
 other hand, shouldn't ports that install files in
 $prefix/share/mime/packages already include an invocation of update-mime-
 database in their post-activation scripts to work correctly? Is that
 commonly not the case (and if it is, why isn't this a big problem
 already)?

 Yep, if base had such support, that would be great! And it would eliminate
 any need to implement our own custom filewatcher/daemon to catch updates
 to the MIME area.

 > If you're doing this change just to delete a few files on deactivation
 of the shared-mime-info port, that can be done with Tcl in a pre-
 deactivate phase and with some magic to use the interfaces to query the
 registry. It's entirely doable to check whether a given file was installed
 by a port from Tcl in a Portfile environment.

 That's not a problem. The challenge is to monitor the MIME area, and
 update the database when things are added/removed by *other* ports.

-- 
Ticket URL: <https://trac.macports.org/ticket/45396#comment:19>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list