Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

man: System manpages have higher priority than user manpages #348946

Open
MithicSpirit opened this issue Oct 16, 2024 · 3 comments
Open

man: System manpages have higher priority than user manpages #348946

MithicSpirit opened this issue Oct 16, 2024 · 3 comments
Labels
0.kind: regression Something that worked before working no longer 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS

Comments

@MithicSpirit
Copy link
Contributor

Describe the bug

/run/current-system/sw/share/man has higher priority than /etc/profiles/per-user/$USER/share/man because /run/wrappers/bin is earlier in the PATH, and it's set to /run/current-system/sw/share/man in the MANPATH_MAP.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install packages with conlicting manpages on the system and the user (e.g., moreutils and parallel).
  2. Try to open the manpage as the user (e.g., man parallel).
  3. Manpage for package installed systemwide is opened.

Expected behavior

It should have opened the manpage for the one installed for the user, as that corresponds to the program that would be executed.

Additional context

I think that the easiest solution here is to remove the MANPATH_MAP entry for /run/wrappers/bin, though maybe this should be behind a setting (I could make a PR for this if desired). I think that ideally there would be a separate manpage collection just for wrappers, but I don't think this is feasible.

Note that this issue started with #65844.

Notify maintainers

@sternenseemann

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.11.2-xanmod1, NixOS, 24.11 (Vicuna), 24.11.20241014.a3c0b3b`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.24.9`
 - nixpkgs: `/nix/store/xnjw9gmfmpppdj6bxpw6cfkspc3h6xwl-source`

Add a 👍 reaction to issues you find important.

@MithicSpirit MithicSpirit added the 0.kind: bug Something is broken label Oct 16, 2024
@sternenseemann
Copy link
Member

cc @matthewbauer

I think variants of this issue can't really be solved with how man-db works. Maybe we should move more of the configuration into the man-db nixos module, so it's easier for users to work around such problems.

@sternenseemann sternenseemann added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 0.kind: regression Something that worked before working no longer and removed 0.kind: bug Something is broken labels Oct 17, 2024
@Aleksanaa
Copy link
Member

What about just switching to environment variables?

@sternenseemann
Copy link
Member

I think PATH has been preferred so far since it also works correctly-ish with nix-shell, see NixOS/nix#4702.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: regression Something that worked before working no longer 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS
Projects
None yet
Development

No branches or pull requests

3 participants