fosskers / aura

A multilingual package manager for Arch Linux and the AUR.
https://fosskers.github.io/aura/
1.66k stars 110 forks source link

Skip dependency checks with `aura -A --nodeps`? #732

Closed ratijas closed 1 week ago

ratijas commented 2 years ago

Summary

Aura's AUR(-A) mode does not support --nodeps flag, which (in -S repositories mode and in pacman itself) allows to install packages without their dependencies. It is marginally useful, because software packagers/maintainers sometimes mess up all the conflicts and provides sections.

Steps to reproduce

  1. Install plocate instead of mlocate. They conflict with each other, while not providing a full alternative.
  2. Try to install pacman-updatedb-hook^AUR with this command: $ aura -A --nodeps pacman-updatedb-hook

Expected result

Should work, just as for $ aura -S --nodeps …

Actual result

$ aura -A --nodeps pacman-updatedb-hook
Invalid option `--nodeps'

Did you mean one of these?
    --deps
    --asdeps

Usage: aura ((-A|--aursync) PACKAGES | (-B|--save) | (-C|--downgrade) 
...
fosskers commented 2 years ago

Does --skipdepcheck do what you're looking for?

ratijas commented 2 years ago

Yes, it does, thanks. I wonder, why

  1. It is different/renamed from -S,
  2. zsh completions are broken.

About the second point, e.g. --verbose is suggested but does not work no matter where you put it (although it fails with different error each time, which is funny).

ratijas commented 2 years ago

However, wait a just a second here.

$ aura -A --skipdepcheck pacman-updatedb-hook
aura >>= Determining dependencies...
aura >>= AUR Packages:
pacman-updatedb-hook
aura >>= Continue? [Y/n] Y
aura >>= Building pacman-updatedb-hook...
aura >>= Building failed. Would you like to see the error? [Y/n] Y
==> ERROR: Could not resolve all dependencies.

aura >>= There was a makepkg failure.
aura >>= Would you like to continue anyway? [Y/n] 
fosskers commented 2 years ago

Right. --skipdepcheck assumes you're otherwise providing the dependencies somehow, at least at the pacman-level. Here pacman is still getting mad due to the missing dep. So either:

  1. --skipdepcheck should imply --nodeps to pacman automatically, or;
  2. I should implement a --nodeps passthrough for you as I do for all the other pacman flags.
ratijas commented 2 years ago

Maybe both, for fine-grained control. Since aura is a wrapper for another tool, it naturally exposes wider API anyway.

Morganamilo commented 2 years ago

Right. --skipdepcheck assumes you're otherwise providing the dependencies somehow, at least at the pacman-level. Here pacman is still getting mad due to the missing dep. So either:

Honestly I don't see what use this would have on its own.

fosskers commented 2 years ago

If memory serves, someone asked for it for a very specific debugging scenario.

fosskers commented 3 weeks ago

Sorry its has taken so long to get around to this. Is this still desired?

fosskers commented 1 week ago

I restored --skipdepcheck in Aura 4 today, so I'm going to close this. Please let me know if anything else comes up.