[–] [S] 2 points 1 year ago* (last edited 1 year ago)

This seems to be basically what I want to achieve, except I realised it only works on official arch repos and so doesnt sync the DB for the AUR, which I'd like. I started looking into it and a way I can use just yay to sync the local DB with the remote since its just a wrapper for pacman, but I got a bit lost.

Using yay to sync both official and aur I think also means I need to create only one .timer and one .service files to sync the DBs, instead of having one of each for checkupdates and whatever yay command I use, right?

Any ideas for what I could use without needing to enter sudo password since it needs to run in the background?

Thanks

EDIT: I solved the passwordless issue I think by adding this to my sudoers:

myuser ALL=(ALL) NOPASSWD: /usr/bin/yay -Sy --noconfirm

I verified by running yay -Sy --noconfirm and it worked without asking for password so I think if I use that in my systemd timer service if will work, but now I would like to check against the local DB everytime I open the terminal.

EDIT 2: In my .bin/check_last_update.sh script I replaced this line

num_packages_to_update=$(checkupdates | wc -l)

with this:

num_packages_to_update=$(yay -Qu | wc -l)

I think it works now, but I'm not sure if the -Qu flags also check for AUR updates.

  • source
  • parent
  • context
  • It takes that long to run. Remove it if you don't like it, or background the task on execution, though you won't see it's output if you do so.

    You don't need this in your zsh profile. Run it in a cronjob if you're that concerned.

  • source
  • view more: ‹ prev