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

MacPorts noreply at macports.org
Wed May 31 12:15: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 neverpanic):

 As outlined in https://trac.macports.org/ticket/67533#comment:19, I really
 don't like the use of autostarting things for this. We should not auto-
 start anything on users systems without an action from them that tells us
 this is OK. In the few ports that use autostart so far, installing the
 port is this step (because the ports aren't dependencies of anything that
 get auto-installed).

 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)?

 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.

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


More information about the macports-tickets mailing list