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

[config] yay --answer configs dependant on --xxxxmenu been true. No install confirmation prompt #1726

Open
DrKittens opened this issue Mar 10, 2022 · 0 comments

Comments

@DrKittens
Copy link

DrKittens commented Mar 10, 2022

Affected Version

yay v11.1.2 - libalpm v13.0.1

Describe the bug

Below config should reproduce from a vanilla yay & unaltered pacman install

part 1:
yay -G --save --editor vim
yay -G --save --noeditmenu
yay -G --save --answeredit All
yay -G --save --nodiffmenu
yay -G --save --answerdiff All
yay -S <package>

part 2: - perform after part 1
yay -G --save --editmenu
yay -G --save --diffmenu
yay -S <package>

What happens:

Part 1:

  • yay does not prompt or show diffs even though --answerdiff is set to All

  • yay does not prompt or open the editor to alter the pkgbuild even thought --answeredit is set to all

  • yay proceeds to immediately install the package after yay -S without prompting the user to confirm as if --noconfirm has been passed in the config or commandline when it has not. The user expectation is to view the pkgbuild diffs and edit it, an unconfirmed build and install is nearly as wrong as wrong can get

part 2:

  • now that --diffmenu is true yay respects --answerdiff all and now shows the diffs
  • yay then prompts me to confirm i want to proceed after viewing diffs
  • now that --editmenu is true yay respects --answeredit all and now opens the pkgbuild in the editor
  • after closing vim yay once again prompts to confirm i want to proceed even though it asked earlier.
  • yay installs the package successfully

Reproduction Steps

part 1:
yay -G --save --editor vim
yay -G --save --noeditmenu
yay -G --save --answeredit All
yay -G --save --nodiffmenu
yay -G --save --answerdiff All
yay -S protontricks-git

part 2: - perform after part 1
yay -G --save --editmenu
yay -G --save --diffmenu
yay -S protontricks-git

installation of any package should reproduce, it additionally doesnt have to be the same one from part 1 in part 2.

Expected behavior

yay's configurations for --answeredit / --answerclean / --answerdiff etc should work without needing the associated menu flag set to true.

I want to perform the action, i dont want to be asked to do it.

yay should not ask me more than once per package if i want to proceed with the install, it should ask me a single time after i've viewed the diff and the pkgbuild not after each occurrance.

Output

``
This config does not display diffs / editmenu or ask at all to confirm install, it just does it. reproduces part 1.
yay -Pg
{
"aururl": "https://aur.archlinux.org",
"buildDir": "/home/username/.cache/yay",
"editor": "vim",
"editorflags": "",
"makepkgbin": "makepkg",
"makepkgconf": "",
"pacmanbin": "pacman",
"pacmanconf": "/etc/pacman.conf",
"redownload": "no",
"rebuild": "no",
"answerclean": "All",
"answerdiff": "All",
"answeredit": "All",
"answerupgrade": "",
"gitbin": "git",
"gpgbin": "gpg",
"gpgflags": "",
"mflags": "",
"sortby": "popularity",
"searchby": "name-desc",
"gitflags": "",
"removemake": "ask",
"sudobin": "sudo",
"sudoflags": "",
"requestsplitn": 150,
"completionrefreshtime": 7,
"bottomup": false,
"sudoloop": true,
"timeupdate": false,
"devel": false,
"cleanAfter": true,
"provides": true,
"pgpfetch": true,
"upgrademenu": true,
"cleanmenu": false,
"diffmenu": false,
"editmenu": false,
"combinedupgrade": true,
"useask": false,
"batchinstall": true,
"singlelineresults": true,
"version": "11.1.2"
}

Output showing no user confirmation, not showing the diff and not opening the pkgbuild in the editor for editing and instead just performing confirmation-less build and install aka bug from part 1:
https://pastebin.com/zpYgNwgR

This yay config reproduces part 2 (asks user proceed after diff then after edit for a single package) demonstrating reliance / buggy behaviour

yay -Pg
{
"aururl": "https://aur.archlinux.org",
"buildDir": "/home/username/.cache/yay",
"editor": "vim",
"editorflags": "",
"makepkgbin": "makepkg",
"makepkgconf": "",
"pacmanbin": "pacman",
"pacmanconf": "/etc/pacman.conf",
"redownload": "no",
"rebuild": "no",
"answerclean": "All",
"answerdiff": "All",
"answeredit": "All",
"answerupgrade": "",
"gitbin": "git",
"gpgbin": "gpg",
"gpgflags": "",
"mflags": "",
"sortby": "popularity",
"searchby": "name-desc",
"gitflags": "",
"removemake": "ask",
"sudobin": "sudo",
"sudoflags": "",
"requestsplitn": 150,
"completionrefreshtime": 7,
"bottomup": false,
"sudoloop": true,
"timeupdate": false,
"devel": false,
"cleanAfter": true,
"provides": true,
"pgpfetch": true,
"upgrademenu": true,
"cleanmenu": false,
"diffmenu": true,
"editmenu": true,
"combinedupgrade": true,
"useask": false,
"batchinstall": true,
"singlelineresults": true,
"version": "11.1.2"
}

Output showing a double confirm with config above ex part 2.
$ yay -S protontricks-git
:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur:1] protontricks-git-1.6.0-1

:: PKGBUILD up to date, Skipping (1/0): protontricks-git
1 protontricks-git (Installed) (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> All
-> protontricks-git: No changes -- skipping

==> Proceed with install? [Y/n] y
:: (1/1) Parsing SRCINFO: protontricks-git
1 protontricks-git (Installed) (Build Files Exist)
==> PKGBUILDs to edit?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> All

==> Proceed with install? [Y/n] n

if answer y it proceeds as normal

``

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

No branches or pull requests

1 participant