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?

3
  • You can see changelog in a browser at ppa homepage.
    – Pilot6
    Commented Sep 2, 2015 at 15:43
  • @Pilot6: Yes, but I want to do it in Terminal in an efficient way.
    – user364819
    Commented Sep 2, 2015 at 15:45
  • 1
    I added another script that checks the package version.
    – Pilot6
    Commented Sep 2, 2015 at 20:55

1 Answer 1

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>
10
  • Is there no way then to specifically just download part of the source (the bit that contains the changelog) and then just extract that? Or does it not work like that?
    – user364819
    Commented Sep 2, 2015 at 17:00
  • 1
    You can't download a part of an archive. But you can download a full archive, then extract a file from it.
    – Pilot6
    Commented Sep 2, 2015 at 17:03
  • What if the archive is very large though, is there no way of going around downloading the entire archive?
    – user364819
    Commented Sep 2, 2015 at 17:12
  • I do not think there is a way. Launchpad will not extract a file for you.
    – Pilot6
    Commented Sep 2, 2015 at 17:17
  • If I contacted Debian, is there any way they could do it differently so that something like apt-get changelog <package> would work?
    – user364819
    Commented Sep 2, 2015 at 17:31

You must log in to answer this question.