Skip to content

desktop-files-utils: add setupHook to remove mimeinfo.cache#55465

Merged
worldofpeace merged 1 commit intoNixOS:masterfrom
worldofpeace:desktop-file-utils-hook
Feb 9, 2019
Merged

desktop-files-utils: add setupHook to remove mimeinfo.cache#55465
worldofpeace merged 1 commit intoNixOS:masterfrom
worldofpeace:desktop-file-utils-hook

Conversation

@worldofpeace
Copy link
Copy Markdown
Contributor

@worldofpeace worldofpeace commented Feb 9, 2019

Post-Installation scripts are running update-desktop-database -q
creating these files which obviously results in a lot of collisions.

Much better solution than eventually noticing their existence and
removing them in postInstall.

Motivation for this change

Probably been mentioned more than a few times that we should just
go ahead and do this.

Closes #48295

Things done

Built file-roller and the mimeinfo.cache doesn't exist anymore.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Post-Installation scripts are running `update-desktop-database -q`
creating these files which obviously results in a lot of collisions.

Much better solution than eventually noticing their existence and
removing them in postInstall.
@worldofpeace worldofpeace requested a review from jtojnar February 9, 2019 00:31
@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Feb 9, 2019
Copy link
Copy Markdown
Member

@jtojnar jtojnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@worldofpeace
Copy link
Copy Markdown
Contributor Author

Let's build one more just to test.
Should be fine though.

@GrahamcOfBorg build font-manager

@worldofpeace worldofpeace merged commit 69be72a into NixOS:master Feb 9, 2019
@worldofpeace worldofpeace deleted the desktop-file-utils-hook branch February 9, 2019 01:29
@danbst
Copy link
Copy Markdown
Contributor

danbst commented Dec 20, 2019

Related -- a hacky way to install mimeinfo.cache profile-wide #13134 (comment)

Still don't know how to solve the problem for nix-env and various caches correctly.

@worldofpeace
Copy link
Copy Markdown
Contributor Author

@danbst This is one of the things that confuse me, because that's like what's done already but system wide. We use environment.extraSetup, which would work correctly for https://nixos.org/nixos/options.html#users.users.%3Cname%3F%3E.packages. Getting things to work well for nix-env continues to be difficult. Is there a way to specify extra commands to run for the nix-env environment? I already know home-manager works better for this https://github.com/rycee/home-manager#usage...
(then again nix-env is a special tool IMHO)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Collision of mimeinfo.cache

4 participants