From 13a00498613188b6b40a7c1ad55eece2c5dd5da7 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 18 Nov 2010 12:13:43 +0100 Subject: [PATCH] drop apt-changelog, apt-get changelog provides this --- cmdline/apt-changelog | 67 ---------------------------------- cmdline/makefile | 5 --- doc/apt-changelog.1.xml | 80 ----------------------------------------- 3 files changed, 152 deletions(-) delete mode 100755 cmdline/apt-changelog delete mode 100644 doc/apt-changelog.1.xml diff --git a/cmdline/apt-changelog b/cmdline/apt-changelog deleted file mode 100755 index 6d7c0e95f..000000000 --- a/cmdline/apt-changelog +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh -# Fetch Package changelog for given source or binary package. Send it through -# a pager if stdout is a terminal. -# (C) 2010 Canonical Ltd -# Author: Martin Pitt - -set -e - -# evaluate and check CLI argumens -pkg="$1" - -if [ -z "$1" -o -n "$3" ]; then - echo "Usage: $0 [ | candidate ]" >&2 - exit 1 -fi - -version="$2" - -# do we want the log for the currently installed version? -if [ -z "$version" ]; then - if ! dpkgs=`dpkg -s $pkg 2>/dev/null`; then - echo "ERROR: Package $pkg is not installed; try 'candidate' version for uninstalled packages" >&2 - exit 1 - fi - version=`echo "$dpkgs" | grep ^Version` -fi - -# turn binary package names into source -if src=`apt-cache show $pkg 2>/dev/null| grep -m 1 ^Source:`; then - pkg=${src#Source: } -fi - -# get version and directory -if ! showsrc=`apt-cache showsrc $pkg 2>/dev/null` || [ -z "$showsrc" ] ; then - echo "ERROR: Source or binary package $pkg does not exist" >&2 - exit 1 -fi - -if [ "$version" = "candidate" ]; then - version=`echo "$showsrc"| grep -m 1 ^Version:` -fi - -# strip off tag name and epoch -version=${version#Version: } -version=${version#*:} - -dir=`echo "$showsrc"| grep ^Directory:` -dir=${dir#Directory: } - -# get configuration -eval `apt-config shell SERVER Apt::Changelog::Server` - -if [ -z "$SERVER" ]; then - echo "ERROR: You need to set Apt::Changelog::Server configuration option" >&2 - exit 1 -fi - -# fetch it -OUT=`mktemp -t "${pkg}.changes.XXXXXX"` -trap "rm $OUT" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM -if ! wget -q -O- ${SERVER}/$dir/${pkg}_${version}/changelog > "$OUT" -then - echo "ERROR: changelog for this version is not (yet) available; try https://launchpad.net/ubuntu/+source/$pkg/+changelog" >&2 - exit 1 -fi -sensible-pager "$OUT" - diff --git a/cmdline/makefile b/cmdline/makefile index 61fa77dc2..12418bd28 100644 --- a/cmdline/makefile +++ b/cmdline/makefile @@ -65,9 +65,4 @@ include $(COPY_H) #TARGET=program #include $(COPY_H) -# The apt-changelog program -SOURCE=apt-changelog -TO=$(BIN) -TARGET=program -include $(COPY_H) diff --git a/doc/apt-changelog.1.xml b/doc/apt-changelog.1.xml deleted file mode 100644 index f881dad8a..000000000 --- a/doc/apt-changelog.1.xml +++ /dev/null @@ -1,80 +0,0 @@ - - -%aptent; - - -%aptverbatiment; - -]> - - - - - - - Martin - Pitt - - - &apt-email; - &apt-product; - - 09 November 2010 - - - - apt-changelog - 1 - APT - - - - - apt-changelog - APT package changelog retriever - - - - - - apt-changelog - packagename - - version - candidate - - - - - Description - - apt-changelog downloads a package changelog and displays - it through sensible-pager. The server name and base - directory is defined in the APT::Changelog::Server - variable (e. g. http://packages.debian.org/changelogs for - Debian or http://changelogs.ubuntu.com/changelogs for - Ubuntu). - - - - By default it displays the changelog for the version that is installed. - However, you can specify a different version as the second argument; if you - specify candidate, it will fetch the changelog for the - latest available version of that package, i. e. the version which you would - get with apt-get install packagename. - - - -See Also - -&apt-get; - - - - &manbugs; - - - -- 2.50.0