4
70
Fork
You've already forked pay-respects
4

[Bug]: Inferred package manager is wrong #34

Closed
opened 2025年12月11日 17:40:27 +01:00 by Dietr1ch · 3 comments

What happened?

I'm on a NixOS system and, based on the pfl is required to find packages error it must be assumed to be a Gentoo-based one.

"{} pfl is required to find packages",

The command and output

asdf # missing package so it tells me to install it

asdf
fish: Command not found: asdf
pay-respects: pfl is required to find packages
pay-respects: No matching package found

image

Build information

version: 0.7.9

No similar issue

  • I have searched the issue list and there is no similar issue found
### What happened? I'm on a NixOS system and, based on the `pfl is required to find packages` error it must be assumed to be a Gentoo-based one. https://codeberg.org/iff/pay-respects/src/commit/c75fb48dad63b0e4af75ed826cbddf553ebea1b9/core/src/system.rs#L98 ### The command and output asdf # missing package so it tells me to install it ```fish asdf ``` ```console fish: Command not found: asdf pay-respects: pfl is required to find packages pay-respects: No matching package found ``` ![image](/attachments/2fe45914-ef91-452b-9d42-4f9588cbb1ae) ### Build information version: 0.7.9 ### No similar issue - [x] I have searched the issue list and there is no similar issue found

I worked around it with by specifying the config, but since there's no system-level configuration (at least documented), it's a bit annoying to have to fix this for every user.

# ~/.config/pay-respects/config.toml
[package_manager]
package_manager = "nix"
install_method = "Shell"
I worked around it with by specifying the config, but since there's no system-level configuration (at least documented), it's a bit annoying to have to fix this for every user. ```toml # ~/.config/pay-respects/config.toml [package_manager] package_manager = "nix" install_method = "Shell" ```
Owner
Copy link

Do you have emerge installed? It's check alphabetically so 'e'merge is before 'n'ix.

You can set it with environment variables. Documented at README (maybe should be moved into configuration.

  • _PR_PACKAGE_MANAGER: Use defined package manager instead of
    auto-detecting alphabetically. Empty value disables package search
    functionality
    • _DEF_PR_PACKAGE_MANAGER: compile-time value
Do you have `emerge` installed? It's check alphabetically so 'e'merge is before 'n'ix. You can set it with environment variables. Documented at README (maybe should be moved into configuration. > - `_PR_PACKAGE_MANAGER`: Use defined package manager instead of > auto-detecting alphabetically. Empty value disables package search > functionality > - `_DEF_PR_PACKAGE_MANAGER`: compile-time value

I don't, but I checked my $PATH and there's an emacs merge executable called emergein there added by emacsclient :/

ls -l (which emerge)
lrwxrwxrwx - root 31 Dez 1969 $HOME/.nix-profile/bin/emerge -> /nix/store/$HASH-emacsclient-commands-0-unstable-2023年09月22日/bin/emerge

I think that setting the $_PR_PACKAGE_MANAGER variable on a system-level would fix things. Checking if the binary called $PM is actually the package manager $PM you expect it to be is a step too far into paranoia.

I'd still prefer system-level config over environment variables (#35), but better documentation on the environment variables maybe lets me also set the install method globally.

I don't, but I checked my `$PATH` and there's an emacs merge executable called `emerge`in there added by `emacsclient` :/ ```fish ls -l (which emerge) ``` ```console lrwxrwxrwx - root 31 Dez 1969 $HOME/.nix-profile/bin/emerge -> /nix/store/$HASH-emacsclient-commands-0-unstable-2023年09月22日/bin/emerge ``` I think that setting the `$_PR_PACKAGE_MANAGER` variable on a system-level would fix things. Checking if the binary called $PM is actually the package manager $PM you expect it to be is a step too far into paranoia. I'd still prefer system-level config over environment variables (https://codeberg.org/iff/pay-respects/issues/35), but better documentation on the environment variables maybe lets me also set the install method globally.
Sign in to join this conversation.
No Branch/Tag specified
main
dev
nightly
v0.8.8
v0.8.7
v0.8.6
v0.8.5
v0.8.4
v0.8.3
v0.8.2
v0.8.1
v0.8.0
v0.7.13
v0.7.12
v0.7.11
v0.7.10
v0.7.9
v0.7.8
v0.7.7
v0.7.6
v0.7.5
v0.7.4
v0.7.3
v0.7.2
v0.7.1
v0.7.0
v0.6.14
v0.6.13
v0.6.12
v0.6.11
v0.6.10
v0.6.9
v0.6.8
v0.6.7
v0.6.6
v0.6.5
v0.6.4
v0.6.3
v0.6.2
v0.6.1
v0.6.0
v0.5.15
v0.5.14
v0.5.13
v0.5.12
v0.5.11
v0.5.10
v0.5.9
v0.5.8
v0.5.7
v0.5.6
v0.5.5
v0.5.4
v0.5.3
v0.5.2
v0.5.1
v0.5.0
v0.4.18
v0.4.17
v0.4.16
v0.4.15
v0.4.14
v0.4.13
v0.4.12
v0.4.11
v0.4.10
v0.4.9
v0.4.8
v0.4.7
v0.4.6
v0.4.5
v0.4.4
v0.4.3
v0.4.2
v0.4.1
v0.4.0
v0.3.4
v0.3.3
v0.3.2
v0.3.1
v0.3.0
v0.2.1
v0.2.0
v0.1.1
v0.1.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
iff/pay-respects#34
Reference in a new issue
iff/pay-respects
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?