New 'ubuntu-changes' script on drescher

Colin Watson cjwatson at ubuntu.com
Sun Jun 22 00:02:53 BST 2008


I hacked together a quick script this evening to display the Ubuntu
changelog entries for a package since the last Debian version. It's
installed as ~lp_archive/bin/ubuntu-changes on drescher, and also
attached to this mail.

I find this useful when doing syncs: you can run 'ubuntu-changes
PACKAGENAME' to display the changes that should have been integrated in
Debian if the sync is to be allowed.

Cheers,

-- 
Colin Watson                                       [cjwatson at ubuntu.com]
-------------- next part --------------
#! /bin/sh

DIST=intrepid

MADISON="$(madison-lite -a source -s "$DIST" "$1")"
[ "$MADISON" ] || exit 1

VER="$(echo "$MADISON" | cut -d'|' -f2 | tr -d ' ' | sed -r 's/^[0-9]+://')"
SECTION="$(echo "$MADISON" | cut -d'|' -f3 | tr -d ' ')"
case $SECTION in
	$DIST)
		SECTION=main
		;;
	$DIST/*)
		SECTION="${SECTION#$DIST/}"
		;;
esac
case $1 in
	lib?*)
		POOLINDEX="$(echo "$1" | cut -c 1-4)"
		;;
	*)
		POOLINDEX="$(echo "$1" | cut -c 1)"
		;;
esac

NL='
'
OLDIFS="$IFS"
IFS="$NL"
wget -q -O- http://changelogs.ubuntu.com/changelogs/pool/$SECTION/$POOLINDEX/$1/${1}_$VER/changelog | while read line; do
	IFS="$OLDIFS"
	case $line in
		[A-Za-z0-9]*)
			# changelog entry header
			target="$(echo "$line" | cut -d' ' -f3)"
			target="${target%;}"
			case $target in
				warty|hoary|breezy|dapper|edgy|feisty|gutsy|hardy|intrepid)
					;;
				*)
					exit 0
					;;
			esac
			;;
	esac
	echo "$line"
	IFS="$NL"
done
IFS="$OLDIFS"


More information about the ubuntu-archive mailing list