Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 720  / 3 Years ago, wed, june 16, 2021, 7:51:39

I use a lot of PPA's. I'd like to check if all of them have packages for Saucy before updating.



Is there a program which checks whether my PPAs have packages for a different version of Ubuntu?


More From » apt

 Answers
6

This can be scripted... It'll need altered versions of two of my previous answers: one to get a list of all the PPAs and another to check if a URL is live. With those two techniques we can build a real launchpad URL and test it.



dist="saucy"
ppas=$(grep -RoPish "ppa.launchpad.net/[^/]+/[^/ ]+" /etc/apt | sort -u)
while read -r ppa; do
url="http://$ppa/ubuntu/dists/$dist/"
if [[ $(wget -O /dev/null "$url" 2>&1|grep "200 OK"|wc -l) == "0" ]]; then
echo "$ppa does not have a $dist version"
fi
done <<< "$ppas"


It's an ugly script but it's so beautiful at the same time.


[#28736] Friday, June 18, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
heathree

Total Points: 157
Total Questions: 132
Total Answers: 108

Location: Honduras
Member since Mon, Apr 5, 2021
3 Years ago
;