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

AUR updates prompt (again) during post-build install #91

Closed
glen3b opened this issue May 12, 2018 · 43 comments
Labels

Comments

@glen3b
Copy link

@glen3b glen3b commented May 12, 2018

Feature request to make batch updates friendlier.

Description

Since prompting for AUR sanity checking is done entirely at the beginning of the update process (Do you want to see the changes of ___?), once those prompts are done, the install should be completed in batch afterwards; that is, the actual package install command passed to pacman should not further prompt for confirmation.

Expected Behavior

Installation should occur in batch. No further blocking user prompts should be needed after the initial sequence of prompts.
The snippet below should not block waiting for user input where it does.

Current Behavior

For instance, when updating "discord-canary" (relevant exerpt from command line output):

==> Creating package "discord-canary"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Adding install file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: discord-canary 0.0.49-1 (Sat May 12 11:42:07 PDT 2018)
==> Cleaning up...
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) discord-canary-0.0.49-1

Total Installed Size:  145.69 MiB
Net Upgrade Size:        0.00 MiB

:: Proceed with installation? [Y/n] 

It blocks waiting for user input, even though I've already completed all confirmation prompts before the AUR updating began.

Possible Solution

I don't know where this is in your code, but probably just pass a --noconfirm to the underlying pacman call for AUR package updates/installations. Not sure if this could cause issues in potentially dangerous edge cases but it would probably work here. Assuming no edge cases we're worried about, should be a fairly straightforward fix.

Steps to Reproduce

  1. aurman -Syu (and wait for repository phase to finish)
  2. Answer all prompts at the beginning of the AUR update process
  3. Wait for one package build to complete, and then wait for it to prompt for installation
@glen3b glen3b changed the title AUR updates prompt during install AUR updates prompt (again) during post-build install May 12, 2018
@polygamma

This comment has been minimized.

Copy link
Owner

@polygamma polygamma commented May 12, 2018

nope, not possible, --noconfirm is not behaving well in case of e. g. conflicts

@polygamma polygamma closed this May 12, 2018
@glen3b

This comment has been minimized.

Copy link
Author

@glen3b glen3b commented May 12, 2018

Doesn't aurman do dependency resolution itself anyway? So if there is e.g. a conflict it will be presented to the user, who will confirm their desired behavior, earlier (i.e. before pacman is called)?

@glen3b

This comment has been minimized.

Copy link
Author

@glen3b glen3b commented May 12, 2018

This is potentially a dupe of/related to #73

@polygamma

This comment has been minimized.

Copy link
Owner

@polygamma polygamma commented May 12, 2018

you cannot pass the desired behavior for e.g. conflicts to pacman without hacky stuff. normal --noconfirm defaults to "no"

@AladW

This comment has been minimized.

Copy link

@AladW AladW commented May 16, 2018

You could use pacinstall --remove; no hacks involved and explicitly created for scenarios such as this. aurman should already have all required information available.

Note: requires pacutils (which is in the repos anyway)

@polygamma polygamma reopened this May 20, 2018
@polygamma polygamma added question and removed wontfix labels May 20, 2018
@polygamma

This comment has been minimized.

Copy link
Owner

@polygamma polygamma commented May 20, 2018

Why do you recommend pacinstall --remove over using --ask of pacman? I saw you mentioning --ask in a pikaur issue. Is --ask documented anywhere? And is this https://bbs.archlinux.org/viewtopic.php?pid=270866#p270866 up-to-date?

@AladW

This comment has been minimized.

Copy link

@AladW AladW commented May 20, 2018

Yes, that forum post is (apart from https://git.archlinux.org/pacman.git/commit/?id=b8c84479712f021735466d9882bf8ebbf1c558e4) up-to-date. The flag however is not documented as it is only used in the pacman test suite. See this commit: https://git.archlinux.org/pacman.git/commit/?id=90e3e026d1236ad89c142b427d7eeb842bbb7ff4

I mentioned pacinstall because it's a tool with this use case in mind, rather than abusing an undocumented flag that could be removed at any time anyway. See also andrewgregory/pacutils#15 (comment)

@polygamma

This comment has been minimized.

Copy link
Owner

@polygamma polygamma commented May 21, 2018

i did not choose to use pacinstall, since i do not want to use another tool as pacman wrapper. i fiddled around with --ask and it actually does exactly what i want, hence that's fine. if --ask actually gets deleted, it's easy to revert in the aurman sourcecode. see: 9f4cf13

so i guess aurman now fully implements batch interaction?

@AladW

This comment has been minimized.

Copy link

@AladW AladW commented May 21, 2018

If it's part of a release probably.

Note there's some ongoing discussion on the difference between "compute all dependencies yourself and feed what you found to pacman with --ask during the build process" or "find out on all conflicts and prompt the user, save the answers and feed them to pacman during the build process".

https://wiki.archlinux.org/index.php/Talk:AUR_helpers#pikaur.27s_interactive_control_flow

@polygamma

This comment has been minimized.

Copy link
Owner

@polygamma polygamma commented May 21, 2018

It is part of the 2.9.27 release.

I am however not quite sure what you mean by

"compute all dependencies yourself and feed what you found to pacman with --ask during the build process" or "find out on all conflicts and prompt the user, save the answers and feed them to pacman during the build process"

aurman does both? makepkg -s is not used, all conflicts are also shown to the user before any building starts.

@polygamma

This comment has been minimized.

Copy link
Owner

@polygamma polygamma commented May 21, 2018

see:

screenshot from 2018-05-21 21-41-25

@AladW

This comment has been minimized.

Copy link

@AladW AladW commented May 21, 2018

Yes, I'm trying to figure out myself what the supposed pain point is. In my view having all remove/installed packages in a single view to which the user can agree to or not with Y/N is much better than getting 20 prompts on whether packages should be replaced or not.

I'm hoping @actionless will clarify this a bit in his github wiki or README.

@AladW

This comment has been minimized.

Copy link

@AladW AladW commented May 21, 2018

PS Feel free to update the wiki + link to commit.

@polygamma

This comment has been minimized.

Copy link
Owner

@polygamma polygamma commented May 21, 2018

Thanks @AladW - closing this issue for now, since what @glen3b wanted is implemented

@polygamma polygamma closed this May 21, 2018
@polygamma polygamma removed the question label May 21, 2018
@actionless

This comment has been minimized.

Copy link

@actionless actionless commented May 21, 2018

i just tried now aurman -Syu <some_aur_pkg_name> and instead of batch interaction which is claimed in arch wiki, i see what it first did pacman -Syu, and asked user to confirm repo packages, next it took some time to first download, next install the packages, run all hooks on them, and only after that it started one more prompt about aur packages, that doesn't looks like a batch interaction at all

@polygamma

This comment has been minimized.

Copy link
Owner

@polygamma polygamma commented May 21, 2018

use --do_everything if you want 100% batch interaction, since aurman handles the -Syu in that case, too. but well, the pacman -Syu is just pacman, nothing more and nothing less, fiddling around with that is stupid

edit: i need to set "100% batch interaction" into quotes since this post gets referenced by @actionless, and he tries to cite this out of context. he claims that aurman does not provide full batch interaction, since I myself said "100% batch interaction" is only achieved by using "--do_everything". The 100% thing references his definition of only confirming all transactions once, which is only possible when not letting pacman handle -u. aurman handles -u with --do_everything, hence this fulfills the definition of @actionless, nothing more and nothing less. without that flag, aurman creates one batch interaction for everything besides -u, -u is handled by pacman in that case, thus creating all in all 2 interactions, which butthurts @actionless .

@actionless

This comment has been minimized.

Copy link

@actionless actionless commented May 21, 2018

i mean it should be stated somehow what it could either wrapping pacman accurately either have batch interaction, but now both at the same time; and mb also what batch interaction require additional flag (but not sure about the latter)

@polygamma

This comment has been minimized.

Copy link
Owner

@polygamma polygamma commented May 21, 2018

???

@actionless

This comment has been minimized.

Copy link

@actionless actionless commented May 21, 2018

use --do_everything if you want 100% batch interaction

@AladW

This comment has been minimized.

Copy link

@AladW AladW commented May 21, 2018

In this case I would agree in leaving repo commands unchanged is a better course of action. This fits the definition of the "batch interaction" column:

ability to move prompts and user interaction before the start of any build process

But if someone has a better wording I'm happy to take it.

@polygamma

This comment has been minimized.

Copy link
Owner

@polygamma polygamma commented May 21, 2018

--do_everything is being described in the readme, so what else do you want?

@actionless

This comment has been minimized.

Copy link

@actionless actionless commented May 21, 2018

i would reword to build and install process

@actionless

This comment has been minimized.

Copy link

@actionless actionless commented May 21, 2018

@polygamma not from you, i want more clear info in the arch wiki table

@AladW

This comment has been minimized.

Copy link

@AladW AladW commented May 21, 2018

FWIW, I don't think pacaur had any of this fancy "let's break up pacman -Syu for fancy stuff" either and it was the originator of the term batch interaction.

@actionless

This comment has been minimized.

Copy link

@actionless actionless commented May 21, 2018

could i then claim a separate feature in the right column "really batch interaction"?

@polygamma

This comment has been minimized.

Copy link
Owner

@polygamma polygamma commented May 21, 2018

@actionless - are you being serious?

@AladW

This comment has been minimized.

Copy link

@AladW AladW commented May 21, 2018

I'm not even sure what the argument is. If it is "aurman has more prompts" then I could equally claim aurutils has the "realliest batch interaction" since it has a single file manager window and nothing after that. If it is "pacman -Syu is left as is which causes some additional AUR prompts after it completes" I refer to my comments above.

@actionless

This comment has been minimized.

Copy link

@actionless actionless commented May 21, 2018

but you yourself claimed what batch interaction is not complete without additional flag and that's my whole point, what "not serious" do you see?

@actionless

This comment has been minimized.

Copy link

@actionless actionless commented May 21, 2018

@AladW and you have a mention for that in the rightmost column, vifm

@AladW

This comment has been minimized.

Copy link

@AladW AladW commented May 21, 2018

Things would really be much simpler if you started writing up a detailed wiki article in the pikaur project page that describes what you think other helpers are missing and pikaur does not.

@polygamma

This comment has been minimized.

Copy link
Owner

@polygamma polygamma commented May 21, 2018

@actionless do you really want to split all columns into "is achieved with flag xy, not achieved with setting yz" etc.? this really is just stupid, some things are behind flags, others are not, users should be able to read a readme. sorry, you are behaving like a small child right now. you could also just create your own arch wiki with your own table only mentioning pikaur if that makes you happy

@actionless

This comment has been minimized.

Copy link

@actionless actionless commented May 21, 2018

@AladW I did that 2-3 days ago, more detailed will be only mentioning expect but that will say nothing as a difference except for other people who working a lot with aur helpers/pacman

@actionless

This comment has been minimized.

Copy link

@actionless actionless commented May 21, 2018

@polygamma "Partial" state in the table with a link to which flag to use to enable full batch interaction will be fine

@polygamma

This comment has been minimized.

Copy link
Owner

@polygamma polygamma commented May 21, 2018

by your definition things are only partial if not enabled by default?

@AladW

This comment has been minimized.

Copy link

@AladW AladW commented May 21, 2018

And for the record: I don't want any definitions in the wiki table (like build and install) that encourage questionable behavior like splitting up pacman -Syu.

@AladW

This comment has been minimized.

Copy link

@AladW AladW commented May 21, 2018

And yes, whenever a column says "ability" it means you get a green entry even if something is not enabled by default (which it arguably is, but there it is)

@actionless

This comment has been minimized.

Copy link

@actionless actionless commented May 21, 2018

@AladW you still haven't really explained why splitting -Syu to -Sy and -Su somehow more questionable than a user doing -Syu, hitting N and doing -Syu again

@AladW

This comment has been minimized.

Copy link

@AladW AladW commented May 21, 2018

Oh god, not this again. Well, I'm out.

@actionless

This comment has been minimized.

Copy link

@actionless actionless commented May 21, 2018

i wasn't the one who started it

@polygamma

This comment has been minimized.

Copy link
Owner

@polygamma polygamma commented May 21, 2018

I am out, too. Have fun with whatever you are trying to achieve with your helper @actionless.

@actionless

This comment has been minimized.

Copy link

@actionless actionless commented May 21, 2018

lol, you casted me yourself here and started bitc^Wkidding 😸 🔫

actionless added a commit to actionless/pikaur that referenced this issue May 22, 2018
…plit `-Syu` pacman command to `-Sy` and `-Su`

as it was stated by AladW polygamma/aurman#91 (comment) :

> And yes, whenever a column says "ability" it means you get a green entry even if something is not enabled by default (which it arguably is, but there it is)
@polygamma

This comment has been minimized.

Copy link
Owner

@polygamma polygamma commented Jun 12, 2018

relevant: 088c09f

@AladW

This comment has been minimized.

Copy link

@AladW AladW commented Jun 12, 2018

Looks like this long bikeshed resulted in something positive after all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.