dylanaraps / neofetch

🖼️ A command-line system information tool written in bash 3.2+
MIT License
21.88k stars 1.76k forks source link

Wrong number of packages reported on RHEL-like systems #2281

Open datho7561 opened 1 year ago

datho7561 commented 1 year ago

Description

On RHEL-like systems, sometimes neofetch uses dnf to count packages and sometimes it uses rpm. I don't know why/when it chooses one over the other; on RHEL 8.7 (installed through EPEL) it seems to use rpm, but if I install it on the same OS through nix-shell on RHEL 8.7 it uses dnf. (I tried passing --config none and this doesn't seem to affect the output). Either way, both implementations have a few bugs:

rpm issues

dnf issues

It counts the "Installed packages" text that's printed at the top of dnf list --installed as a package. This text is printed even if the -q option is passed to dnf.

I read the neofetch code and realized what I said here was incorrect. The database and dnf list --installed give different responses for whatever reason. I don't think this part is a bug in neofetch.

Neofetch version

7.1.0

Screenshot

nix-shell-vs-epel-neofetch

Config file

I don't have a personal config file, and I can reproduce this issue when using --config none.

Verbose log

  1. Run neofetch -vv 2> neofetchlog
  2. Upload the contents of neofetchlog to pastebin, gist or equivalent.