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?
Asked
Active
Viewed 823 times
1
-
You can see changelog in a browser at ppa homepage. – Pilot6 Sep 02 '15 at 15:43
-
@Pilot6: Yes, but I want to do it in Terminal in an efficient way. – Sep 02 '15 at 15:45
-
1I added another script that checks the package version. – Pilot6 Sep 02 '15 at 20:55
1 Answers
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>
-
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? – Sep 02 '15 at 17:00
-
1You can't download a part of an archive. But you can download a full archive, then extract a file from it. – Pilot6 Sep 02 '15 at 17:03
-
What if the archive is very large though, is there no way of going around downloading the entire archive? – Sep 02 '15 at 17:12
-
I do not think there is a way. Launchpad will not extract a file for you. – Pilot6 Sep 02 '15 at 17:17
-
If I contacted Debian, is there any way they could do it differently so that something like `apt-get changelog
` would work? – Sep 02 '15 at 17:31 -
Nobody will do it for PPA. Is I said before, changelogs from ppa are not stored in any place except source tarballs. – Pilot6 Sep 02 '15 at 17:36
-
-
-
@ParanoidPanda: You can download the *.debian.tar.xz source file, and extract the debian/changelog file from it. – Gunnar Hjalmarsson Sep 02 '15 at 22:33
-
The `apt-get changelog` is a special feature where the remote distribution maintained host is queried with a custom protocol to fetch the changelog. It would be great if it also worked for PPAs and custom repositories (such as Google and Opera repositories). – Mikko Rantalainen Feb 21 '23 at 10:35