Open Juan-de-Costa-Rica opened 7 months ago
That's interesting!!
Can you put the output of dnf list installed
here?
In our code, we're executing dnf list installed
https://github.com/TanmayPatil105/procfetch/blob/main/src/fetch.cpp#L422.
AFAIK in the latest Fedora versions, yum
is symlinked to dnf
. I'm not sure how yum
is getting invoked here.
That's interesting!! Can you put the output of
dnf list installed
here?
Same error:
❯ dnf list installed
error: unrecognized subcommand 'list'
tip: a similar subcommand exists: 'install'
Usage: yum [OPTIONS] <COMMAND>
For more information, try '--help'.
I'm setting up Fedora 39 on my VM.
Meanwhile, What does man dnf
say about listing all installed packages?
I'm setting up Fedora 39 on my VM. Meanwhile, What does
man dnf
say about listing all installed packages?
Mind you I'm running Bluefin which is a version of Fedora Silverblue, the immutable version of Fedora. It doesn't ship with dnf.
So, does yum list installed
work?
Well, dnf
and yum
are high-level package management tools which perform package management tasks on top of rpm
.
And yes, we are displaying rpm
packages!
Also, I can see in your output hostname
isn't getting displayed.
https://github.com/TanmayPatil105/procfetch/commit/24226741959810e77d2ba9b593c4b92fb5228ea0 should fix it
So, does
yum list installed
work?
Gives the same error.
I think for immutable/atomic Fedora systems it would be nice to show how many packages are installed or 'layered' via rpm-ostree.
Yupp! I was thinking of something like:
if (Path::of("/var/lib/rpm"s).isExecutable())
{
Command::exec_async("rpm -qa"s, [&](auto c) {
std::lock_guard<std::mutex> lock(mtx);
if (Path::of("/bin/dnf"s).isExecutable())
pkgs.push_back(rec{"dnf"s, c->getOutputLines()});
else if (Path::of("/bin/yum"s).isExecutable())
pkgs.push_back(rec{"yum"s, c->getOutputLines()});
else
pkgs.push_back(rec{"rpm"s, c->getOutputLines()});
});
}
I'm curious, what does neofetch
display in the packages?
I'm curious, what does
neofetch
display in the packages?
1982 (rpm), 69 (flatpak), 28 (brew)
Yupp! I was thinking of something like:
For immutable/atomic Fedora you us rpm -qa
to list your system packages and rpm status -v
to list layered packages.
Output of rpm status -v
looks like:
● fedora:fedora/35/x86_64/kinoite
Version: 35.20210924.n.0 (2021-09-24T08:10:09Z)
BaseCommit: 8ca0e98140307a1124c34b3f73001b1cdd29178115c4e5b1e6436e36b0e0f613
GPGSignature: Valid signature by 787EA6AE1147EEE56C40B30CDB4639719867C58F
RemovedBasePackages: firefox 91.0.1-2.fc35
LayeredPackages: zsh virt-manager vim doas fedora-workstation-repositories gstreamer1-plugin-openh264
fedora:fedora/35/x86_64/kinoite
Version: 35.20210923.n.0 (2021-09-23T08:13:58Z)
BaseCommit: 684ee39f6abc9a0b5bda5686a7eac92d02215ca42008a0bce38302bc1c280fef
GPGSignature: Valid signature by 787EA6AE1147EEE56C40B30CDB4639719867C58F
RemovedBasePackages: firefox 91.0.1-2.fc35
LayeredPackages: zsh virt-manager vim doas fedora-workstation-repositories gstreamer1-plugin-openh264
I think that would add more complexity.\
Re-thinking: we should only display the output of rpm -qa
. Showing package managers front-ends as package managers makes less sense.\
We maintain the same approach in Debian-based distributions (dpkg
and apt
). and I think we should maintain that consistency throughout.
https://github.com/TanmayPatil105/procfetch/commit/153d2e0d21f1f49e35d8fd83b2a43acefc7baadb I won't call it a "fix" but now it should work fine!
Running on fresh Fedora atomic I get this error showing up after GPU and before Packages: