Closed metov closed 2 years ago
I think the solution here would be to support user-configurable overrides for the command database. There are potentially 3 ways to do it:
~/.local/installcmd/overrides.yaml
and apply it on top of the one in the package.--config overrides.yaml
1 is my preferred option because it is the most practical way of accounting for a per-system situation, which is the most relevant one for installcmd's design. 2 would be less useful, because if the system has a non standard package manager, you would have to pass the config all the time, and it would get quite tedious. It's a nice option for some future enhancement, but for now I'll just go with 1. I don't really like 3 because it breaks the interface (not a big deal this early in development, but still...). It would require people to specify each command repeatedly for each package, making the pkgspec tedious. Also you would have to redo the work for each pkgspec you have, which doesn't seem very convenient.
Currently, this package is based on the assumption that there is one "correct" package manager command for each OS. This is generally true, but there are some exceptions:
In these situations, hardcoding a command for a given OS does not work well. For example, on Arch Linux, installcmd is only able to support pacman repositories, not AUR. This doesn't make much sense, because AUR has a substantial set of Arch software, and also sometimes packages may be available for Ubuntu as a package but for Arch as only an AUR script. Clearly, we should support tweaking the command somehow.