| Author |
Message |
|
|
Post subject: Display Debian pkg changelogs
Posted: Jan 08, 2008 - 03:04 AM
|
|

Joined: Dec 02, 2006
Posts: 1034
Location: East Coast
Status: Offline
|
|
If you dist-upgrade at least once everyday, I don't think these script will interest you. If you are one of those that like to read the changelogs of packges before upgrading them, to see if they fixed what you wanted, then you'll like what I came out with. A script that goes to http://packages.debian.org/sid/packagename and grabs the link to its changelog then displays it.
Code:
#/bin/bash
pkgname="$1"
# Make sure a package name was given
[ -n ${pkgname} ] || exit 1
# Use the html source of http://packages.debian.org/sid/foo package
# to find the url of the changelog
urllog="$(wget -T10 -t2 -qO- http://packages.debian.org/sid/${pkgname}|grep Changelog |cut -d \" -f 2)"
# Make sure the package name is correct
# If the package doesn't exit, then http://packages.debian.org/sid/foo doesn't exit
# hence urllog is empty
[ "${urllog}" == "" ] && exit 2
wget -T10 -t2 -qO- $urllog
The output may be long, so you might want to use less or tail
ex. displaychangelogonline kopete | less
update: typos |
Last edited by op4latino on Jan 08, 2008 - 03:41 AM; edited 2 times in total
|
| |
|
|
|
 |
|
|
Post subject: RE: Display Debian pkg changelogs
Posted: Jan 08, 2008 - 03:08 AM
|
|

Joined: Dec 02, 2006
Posts: 1034
Location: East Coast
Status: Offline
|
|
|
Code:
#!/bin/bash
pkgname="$1"
[ -n ${pkgname} ] || exit 1
urllog="$(wget -T10 -t2 -qO- http://packages.debian.org/sid/${pkgname}|grep Changelog |cut -d \" -f 2)"
[ "${urllog}" == "" ] && exit 2
echo Opening $urllog
x-www-browser "${urllog}"
It's an alternate version of displaychangelogonline, rather than display the changelog in the console, it will open a new tab in your alternative browser ( /etc/alternatives/x-www-browser ), as default, konqueror for lite ( I think is iceweasel for full, pls confirm)
If someone knows of an already made program for these scripts, please let me know |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: Display Debian pkg changelogs
Posted: Jan 08, 2008 - 03:38 AM
|
|

Joined: Dec 02, 2006
Posts: 1034
Location: East Coast
Status: Offline
|
|
And finally my favorite. Displays the debian and upstream changelog of an installed package. Why one would use this? This will work for any package, let's say like shames repo that doesn't have a changelong in http://packages.debian.org/ . Or like amarok that only says that it's the new release from upstream, but it doesn't say the actual changes.
Note, I know vim can open .gz files, if you don't like vim, you will have to edit the script to your taste If you already run the script, you can exit vim pressing the ESC key then type : q!
Code:
#!/bin/bash
pkg=$1
pathpkg="/usr/share/doc/"
if [ ! -d "${pathpkg}${pkg}" ]
then
echo -e "\"${pkg}\" doesn't exist or is not installed"
exit
fi
if [ -e "${pathpkg}${pkg}/changelog.Debian.gz" ]
then
echo -e "Debian changelog found"
vim -R /usr/share/doc/$1/changelog.Debian.gz
echo -e "press any key to read the non-debian changelog, or abort this script"
read -n 1 x
[[ -e "${pathpkg}${pkg}/changelog.gz" ]] && vim -R /usr/share/doc/$1/changelog.gz || echo -e "non-debian changelog couldn't be found"
else
vim -R /usr/share/doc/$1/changelog.gz
fi
|
|
|
| |
|
|
|
 |
|
|
Post subject: RE: Display Debian pkg changelogs
Posted: Jan 08, 2008 - 12:19 PM
|
|
Joined: Nov 25, 2006
Posts: 2556
Status: Offline
|
|
| What about just using apt-listchanges? |
|
|
| |
|
|
|
 |
|
|
|
|