Skip to content

Retry authentication failures - #13

Open
dcollinsn wants to merge 2 commits into
manjaro:mainfrom
dcollinsn:retry-authentication-failures
Open

Retry authentication failures#13
dcollinsn wants to merge 2 commits into
manjaro:mainfrom
dcollinsn:retry-authentication-failures

Conversation

@dcollinsn

Copy link
Copy Markdown

Have pamac-cli explicitly acquire authorization with Transaction.get_authorization_async() before starting a privileged transaction. Repeat a plain unsuccessful authorization request, but stop when authorization succeeds, the user presses Ctrl-C, or libpamac emits an error with diagnostic details.

While authorization is pending, treat Ctrl-C as cancellation of the entire operation and return status 130. This ensures that losing the terminal agent cannot move the interaction to a GUI agent while the CLI transaction continues.

Resolves #12

Dan Collins added 2 commits July 31, 2026 16:53
Acquire authorization before running privileged transactions and retry ordinary authentication failures. Abort promptly on Ctrl-C and detailed authorization errors, and retain authorization across long-running builds.
Use one timeout-based launch path for root and non-root transactions while preserving the existing delay for terminal Polkit agent registration.
@dcollinsn

Copy link
Copy Markdown
Author

Before this patch, I tried pamac reinstall which. When entering an incorrect password, the process immediately aborted.

I built pamac-cli including this patch with meson setup --reconfigure /home/dcollins/pamac-cli/builddir /home/dcollins/pamac-cli --prefix=/usr --sysconfdir=/etc --buildtype=release and installed it with sudo meson install -C /home/dcollins/pamac-cli/builddir.

I then repeated pamac reinstall which.

  • Entering the correct password succeeded.
  • Entering an incorrect password caused a short delay and then a new password prompt.
  • Pressing Ctrl+C aborted the entire transaction and returned me to a zsh prompt.

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

Successfully merging this pull request may close these issues.

Mistyped password aborts pamac, potentially forcing complete rebuild of AUR packages

1 participant