Force Option
Bill-Joe-Tech opened this issue · comments
Add Force Flag
Background
I would like a force option/flag (if there is not one already) for convenience and time management reasoning.
Proposed feature
Add sudo downgrade foo --force
or something along the lines. Perhaps an option for sudo downgrade foo -f
too if possible.
[ Linux /home/user ]# downgrade gcc
loading packages...
warning: downgrading package gcc (13.2.1-3 => 12.2.1-4)
resolving dependencies...
warning: cannot resolve "gcc-libs=12.2.1-4", a dependency of "gcc"
:: The following package cannot be upgraded due to unresolvable dependencies:
gcc
:: Do you want to skip the above package for this upgrade? [y/N] n
error: failed to prepare transaction (could not satisfy dependencies)
:: unable to satisfy dependency 'gcc-libs=12.2.1-4' required by gcc
[ Linux /home/user ]#
For instance, downgrading gcc would require removal of the existing package, but having a --force
or -f
option would automatically fix the issues presented in the output above (without manual use of pacman, yay, etc). Personally, I had wanted to downgrade gcc to 12.2.1-4 for compatibility with VMware.
Thanks Pat :)
Yes, it looks like downgrade
accepts any arguments after --
as additional arguments to pass with pacman -U
to install the package(s). So, whatever options would prevent pacman
from prompting can be passed there. In your example, I think downgrade gcc -- --noconfirm
may be what you want?
I wonder if the --help
could be clearer on this...
% downgrade --help
Usage: downgrade [option...] <pkg> [pkg...] [-- pacman_option...]
Options:
...
Note:
Options after the -- characters will be treated as pacman options.
...
Closing optimistically, assuming that solves things. Feel free to re-open if not.