Ubuntu – How to check if a PPA has packages for another Ubuntu version

aptppasoftware-recommendation

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?

Best Answer

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.