Quantcast
Viewing all articles
Browse latest Browse all 2849

Programming • Re: [Bash] Output changelog for upgradeable packages?

Thanks! I definitely figured it out due to this suggestion after a bit of trial and error.

W/ apt-listchange, something just wasn't kicking in:

Code:

$ rg eza <(ls -l /var/cache/apt/archives)|rev|awk '{print $1}'|rev|xargs -n1 apt-listchanges --which=bothapt-listchanges: eza_0.19.2_amd64.deb does not exist or is not a file
(Process substitution to work around folder permissions, and rev to grab the last column more easily)

It didn't pop up when I ran apt/apt-get update. Maybe it runs over apt-get upgrade? Never checked it because admittedly, my main package manager is nala.
In that vein, after installing & configuring apt-listchanges, I ran nala upgrade and got pop ups during the package updating, but since nala isn't equipped to deal w/ system prompts during the install process the system hung. I know that can wreck my system (and got an alert saying such lol), so after cancelling the install, I deleted apt-listchanges and decided on a different route.

This led me to the closely-related apt-get changelog, which does the trick:

Code:

sudo apt-get upgrade -s|rg -A1 following|rg -0v following|awk '{print $0}'|xargs -n1 apt-get changelog
Definitely a hack job, let me know if you notice any one-liner rules I'm breaking or a more efficient way of (rip)grepping the important parts. I did learn that I could use print $0 w/ awk to grab all parameters which will definitely come in handy moving forward too.

Statistics: Posted by m4c-attack — 2024-10-10 05:56



Viewing all articles
Browse latest Browse all 2849

Trending Articles