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

Inconsistent privilege escalation for systemd daemon-reload operation #2541

Open
Appryhandsome opened this issue Nov 30, 2024 · 0 comments
Open

Comments

@Appryhandsome
Copy link

Description
When running yay -Syu, the application correctly prompts for sudo password when installing packages, but fails to handle privilege escalation for the systemd daemon-reload operation. This results in an error message:

( X/XX) Reloading system manager configuration...
Invalid operation 'daemon-reload'
error: command failed to execute correctly

Expected Behavior

  • yay should handle privilege escalation for the daemon-reload operation similarly to how it handles package installations
  • Either prompt for sudo password or use the existing sudo session if already running with sudo

Current Behavior

  • yay fails to execute daemon-reload due to insufficient permissions
  • Requires manual intervention (sudo systemctl daemon-reload) to complete the operation properly
  • No password prompt is shown for this specific operation, unlike package installation steps

Steps to Reproduce

  1. Run yay -Syu (without sudo)
  2. Allow the system update to proceed
  3. When it reaches the daemon-reload step, observe the error

Workaround
Running sudo yay -Syu from the start prevents this issue, but is behaviour that should be avoided.

System Information

  • OS: Arch Linux
  • yay version: v12.4.2 - libalpm v15.0.0
  • systemd version: 256 (256.8-2-arch)

Additional Notes
This inconsistency in privilege handling could confuse users, as yay otherwise handles sudo requirements automatically throughout the update process.

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

1 participant