beyondmeh/piu

Manjaro Linux: `piu u` does not upgrade packages

Rocka84 opened this issue · 1 comments

Hi,
first of all: Thanks for this tool, it will save time and prevent headaches!

When using piu u on my manjaro machine, this script executes the command pacman -Sy, which does not upgrade packages but only updates the cache of pacman. The correct command would be pacman -Syu or pacman -Syyu.

Rocka84

@Rocka84 thank you so much for the kind words and taking the time to report that. The latest version of piu should be fixed now.

The command I changed it to was pacman -Su. pacman -Syu updates the cache and upgrades the system. Normally you would want to do both, but piu already has logic to handle updating the package cache if it's old.

piu automatically does a pacman -Sy beforehand if pacman's cache is older than 12 hours. You can change that time by editing UPDATE_AFTER on the 3rd line. If you're interested in how it's coded see pacman_repo_age() and repo_update_if_needed().