beyondmeh / piu

Cross platform package manager wrapper
ISC License
49 stars 11 forks source link

Manjaro Linux: `piu u` does not upgrade packages #3

Closed Rocka84 closed 5 years ago

Rocka84 commented 5 years ago

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

beyondmeh commented 5 years ago

@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().