1

I understand that as apt-get changelog <package> gets its changelogs from changelog.ubuntu.com, running this command does not work to get the changelog for a package in a PPA, and the only real way that I have found is to apt-get source <package> and then look in debian/changelog. Is there a more efficient way of viewing the changelog of a package that is in a PPA in Terminal?

1 Answers1

1

The last changes to a PPA package can bee seen at

https://launchpad.net/~<ppa_user_name>/+archive/ubuntu/<PPA_name>/+files/<package_name>_<package_version>_source.changes

You can write a simple script that will extract this data.

The script can be like this

#!/bin/sh

wget -q -O - https://launchpad.net/~$1/+archive/ubuntu/$2/+files/$3_$4_source.changes | \
awk '/Changes:/{f=1;next}/Checksums/{f=0}flag'

Run it this way:

./changelog.sh <ppa_user_name> <ppa_name> <package_name> <package_version>

e.g.

./changelog.sh hanipouspilot rtlwifi rtlwifi-new-dkms 0.5

If you need a full changelog, not only the last entry, then you have to download and extract source. That can be also done by a script.

Another script that checks changelog of an installed pacakage

#!/bin/bash

data=`apt-cache policy $1 | awk '/\*\*\*/ {print $2} f{print $2;f=0} /\*\*\*/{f=1}'`
version=`echo $data | awk '{print $1}'`
version=`echo $version | sed -r s/^[0-9]+://`
URL=`echo $data | awk '{print $2}'`
if [ -z `echo $URL | grep ppa` ]; then
    echo "The package is not installed from PPA"
    exit
else
    user=`echo $URL | cut -d / -f 4`
    name=`echo $URL | cut -d / -f 5`
    wget  -q -O - https://launchpad.net/~$user/+archive/ubuntu/$name/+files/$1_${version}_source.changes | \
    awk '/Changes:/{f=1;next}/Checksums/{f=0}f' 
fi

It can be run by

./changelog.sh <package_name>
SebMa
  • 2,927
  • 5
  • 35
  • 47
Pilot6
  • 92,041