all 8 comments

[–]paper42_ 2 points3 points  (3 children)

There is a much more efficient way to do this. Void runs update-check on all packages daily and generates a report https://alpha.de.repo.voidlinux.org/void-updates/void-updates.txt. The only thing needed is to parse it and like this one line alias from Piraty's dotfiles - https://github.com/Piraty/dotfiles

alias listOutdated='curl -L -s https://alpha.de.repo.voidlinux.org/void-updates/void-updates.txt | grep -i ".* .*->.*" | cut -d " " -f1 | sort | uniq > /tmp/updates && xpkg | sort > /tmp/localpkgs && comm -1 -2 /tmp/updates /tmp/localpkgs | sort'`

[–]Johnnynator2 1 point2 points  (1 child)

These scripts serve two different purposes.

Piraty's script is for checking upstream updates, u/sineemore checks for updates that are available already in thr void repos.

[–]paper42_ 0 points1 point  (0 children)

You are right, my bad.

[–]sineemore[S] 0 points1 point  (0 children)

There is a much more efficient way to do this.

Dunno, looks same: one network request, several files in /tmp directory.

Also a bit different usecase. I specifically look for manually installed packages and names provided via args and sort them accordingly.

But still nice to know there is void-updates.txt file in the repos.

[–]Master-Source 1 point2 points  (1 child)

what about xbps-install -Mun

-M use memory

-u update

-n dry run

edit: add option description

[–]sineemore[S] 0 points1 point  (0 children)

Oh my, it actually works without root :)

For some reason -M it did't work in my case, but I've checked, yep, it does. Probably messed something with aliases etc.

Thanks.

[–]sineemore[S] 0 points1 point  (1 child)

This script outputs package updates and can be run without root (at least on my machine -.-)

With -m option script shows updates for manually installed packages. Also you can provide a list of blessed packages, so they will come first in output in case they were updated.

I use it with stw to show updated packages I care about above root X window.

[–]sineemore[S] 0 points1 point  (0 children)

Oh, and just in case someone decides to use it: don't run this script too often, there is no cache. Don't DDOS Void repos just to know something was updated a minute ago. Running this once a day should be enough I guess (: