dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

Yum system package enumeration command in setup-fedora.sh is incorrect

Open bonzupii opened this issue 9 months ago • 2 comments

In setup-fedora.sh, line 36, you used ' check=$(yum list installed | grep $package)' this command is incorrect as of dnf5, and fails to properly enumerate system packages for the setup script, requiring manual installation of missing packages unless the following patch is applied to the script prior to running it. the problem with it is it is looking specifically for a package named "installed" rather than listing all installed packages to pipe to the grep command, and because there are no packages named "installed" it simply passes "No matching packages to list" to grep. Even if there were an application called "installed" this would not be useful output for the script to utilize. so anyways, the install option needs to be passed as a flag to work properly, like so: 'check=$(yum list --installed | grep $package)'

bonzupii avatar Jun 06 '25 21:06 bonzupii

Thank you. I will check.

mylinuxforwork avatar Jun 07 '25 07:06 mylinuxforwork

no problem. it looks like the bug is confirmed and has likely already been fixed on your local copy of the git repo, you just have to push the changes? It also might be better practice to use the dnf command rather than the yum command, since dnf offers better performance and security over its yum predecessor. the change I suggest would be very similar to the previous change I suggested: 'check=$(dnf list --installed | grep $package)'

bonzupii avatar Jun 08 '25 12:06 bonzupii