Type: question
Please teach me the solution.
However, --noconfirm cannot be used to overwrite the conflict.
I am assuming you mean the prompt that is shown when more than one package fulfills a dependency? Like this:
yay -S mindustry
:: There are 3 providers available for mindustry:
:: Repository AUR
1) mindustry 2) mindustry-bin 3) mindustry-git
Enter a number (default=1):
What is then the choice that you want to be made automatically? (Hint: "Always the first one" cannot be the answer, because the first one is not always the "best" one, and what is "best" depends a lot on each individual setup and taste.)
So if you really need to hide that prompt (for automation or something like this), then you should know which package you want as a dependency provider. You can then first install just the dependency before installing the actual package:
yay -S --asdeps [dependency]
The --asdeps flag will mark that package as "installed as a dependency", so it can be uninstalled properly later. But this solution only works for specific packages and specific dependencies.
I fear this is not what you want, because you might not know which dependencies are required beforehand, but unfortunately you will have to decide that yourself, because no one can possibly know which dependency provider you would like.
If you really want to live dangerously, and always select some random number like 1, then you could have a look at the expect utility.
(Hint: "Always the first one" cannot be the answer, because the first one is not always the "best" one, and what is "best" depends a lot on each individual setup and taste.)
Until I saw this, I misunderstood that 1 was the best.
I will install using --asdeps first.
@grandchild Thanks.
rootî‚°~î‚°$î‚° sudo -u vanvan yay -S android-platform
:: There are 2 providers available for android-platform:
:: Repository AUR
1) android-platform 2) android-platform-dummy
Enter a number (default=1):
Another question I would like to ask is, is those no choice but to use exact(Besides, yes etc) or --noconirm in such cases?
~I don't understand your question. Is this a different question than the original one? If so, how is this question different? It seems my original answer still applies.~
// edit
Ah sorry, I get it now, the exact package name still gives a choice.
Hm it seems I misunderstood the original question and misremembered the way yay works.
So, if you pass the --noconfirm flag, yay already picks the first option? Then this is what you want, is it not? Or do you want to only skip the provider choice, but still answer yes/no on all other prompts?
@grandchild Sorry. My first question is bad. I've confused you
if you pass the --noconfirm flag, yay already picks the first option?
Yes, that's right.
In https://github.com/Jguer/yay/issues/1370#issuecomment-696178824 , even though I entered the full package name, this happened and I was confused about what to do when automating.
When I think about it, I often get suggestions when using yay.
I just wondered if there was another method for this.
However, --noconfirm could be used if it was separated from the current conflict.
@grandchild Thank you very much, for solving my doubts.
@koumaza and I learned something too, --noconfirm does select the first provider. :)