I'm curious why the author chose to put every command in its own file and then copy the big if tree with string compares in every file.<p>Translating commands from a generic command interface to specific commands is a great case for polymorphism.
C++ is an "interesting" language choice. I would have expected a bash script. Equally portable, and no hassle with compilation for different arch/OS.
The title of the submission is a bit misleading:<p>> GitHub: sysget – A front-end for every package manager (github.com)<p>Right now, it seems like it is GitHub's own project when it's just hosted on GitHub.<p>It should be:<p>> Show HN: sysget – A front-end for every package manager (github.com)
That's not nearly "every package manager".<p>Topgrade [1] upgrades all packages including distribution package managers (such as Homebrew, APT, DNF, ...), language specific package managers (such as Cargo, NPM, Gem, ...), program specific package managers (such as Vim, Tmux, shells, ...), Flatpak/Snap, working on The Big Three (Windows, Linux, macOS).<p>I wish there was a way to update Steam and Battle.net from the CLI as well.<p>[1] <a href="https://github.com/r-darwish/topgrade" rel="nofollow">https://github.com/r-darwish/topgrade</a>
I like this. This makes a lot of sense to me. If it managed to gain adoption into major distros, it would be incredibly good, though obviously that is a longshot for a lot of reasons.<p>If you really want it to get adopted into major distros, the best approach is probably to convince the systemd folks that it would be a great addition to their package ;)<p>edit: A bit of constructive criticism. I really like the concept, but I think the way that package managers are supported could be improved. I think it would be better if all of the handlers for a given package manager were in the same file, instead of having them spread across every file. There's obviously lots of ways to accomplish this.<p>Also, as it is now, this project does not seem to use a ton of things that require C++ - you could shave some binary size cost by converting it to pure C.
Seems like a cool idea!<p>Just a thought, what if you allowed it to run in different modes, for people used to different systems? apt mode, yum mode, pacman mode etc to accept commands in that format.
Some missing features:<p><pre><code> - Show version of an installed package
- List content of package
- Fix package (or reinstall?)
- Install/Update history
- Revert last install/update operation
</code></pre>
Unfortunately not all of these features are directly supported by all package managers.
E.g. package contents for yum are `repoquery -l`.
I have to google this every time. Real value in wrapping that in a simple command.
... why not PackageKit?<p>pkcon is a good tool, even if a bit janky, that hides well lots of the differences between the several package managers it supports.
There is also <a href="https://github.com/icy/pacapt" rel="nofollow">https://github.com/icy/pacapt</a><p>(I much prefer pacman's interface over trying to remember which of dpkg/apt-get/apt-policy to use etc., similarly rpm/dnf)
How does this handle edge cases like needing to run 'brew link' etc. occasionally?<p>What happens when multiple package managers provide the same package?