Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: flag to automatically say yes to "Proceed with installation" #713

Closed
mxmilkiib opened this issue Sep 19, 2018 · 7 comments

Comments

@mxmilkiib
Copy link

A flag to automatically say yes to the "Proceed with installation" question when doing an -Syu (if there is space enough available for the upgrade).

@Morganamilo
Copy link
Contributor

The pacman -Syu call may ask you about replaces, conflicts, keys, ect. So It's not really possible to automatically say yes without noconfim'ing the entire operation. See #653

@mxmilkiib
Copy link
Author

Thanks for your prompt reply. Indeed. Let me extend my proposal's caveat; if there is space enough available for the upgrade and there are no package replacements, conflicts or prompts regarding keys. Or might this not be possible in the context of yay being a pacman wrapper?

@Morganamilo
Copy link
Contributor

Not possible unless yay were to reimplement all of those things that pacman does. But that would be a huge effort and pointless when pacman already has the code. What's one more key press anyway?

@mxmilkiib
Copy link
Author

mxmilkiib commented Sep 20, 2018

I like to start an upgrade just before I go do household chores or some other afk task. I have a problem with my attention, so all to often I start the process, walk away, then forget to come back ~50 seconds later to press enter, and nothing has happened. I was wondering if this essentially pointless requirement for an interaction could be automated away for [the] 90% of times [that it is pointless], but it can't at the level of yay. Thanks anyway.

@mxmilkiib
Copy link
Author

For reference; I managed to find, via the help of elibrokeit in #archlinux-aur, that it's apparently as simple as "echo y | ...".

I didn't want to use --noconfirm as I just wish to use I'm happy with a pause on a package replace request or such.

Though, saying that, I'm contemplating switching to use pacmatic, mostly for the configuration file management aspect.

(Fyi; my attention is bad, I get bored and start doing multiple things to fill in the time, then I don't wish to lose the progress/flow, so I end up further from starting/completing my original task, so I try to use principals from behavioural psychology by shaping my environment to lower 'distractions'.)

@Morganamilo
Copy link
Contributor

Isn't the confirmation for a pacman -Syu pretty much instant though? All it does before hand is refresh the databases which should only take about 5 seconds really. So I don't really see where you've given the chance to get distracted.

Also thinking about it pacman -Syu --noconfirm && yay -Sua might do what you want. Also there's --combinedupgrade in case you were not aware of that flag.

@Flurrywinde
Copy link

Flurrywinde commented Jul 27, 2021

I also wanted this. So far, using expect has been working:

expectupdates() {
expect << EOF
  spawn yay -Syu
  expect_background -ex "Proceed with installation" {send "y\n"}
  interact
EOF
}

Just call this bash function in place of yay -Syu and it will skip past only the "Proceed with installation" prompt.

Edit: You need to have expect installed. (yay expect)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants