From f14d31a661edfbb631dc1f1eea33f6e0155b818b Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 20 May 2007 20:16:58 +0000 Subject: [PATCH] Applied upstream version check to upgrades as well. I wrongly remembered that this should only be required for first installations. Uncommented the dh_link -i command so that ion3-dev.links will be processed, replacing the removed invocation that created the doc link as well. --- debian/changelog | 8 ++++++++ debian/ion3.postinst | 6 ++++-- debian/rules | 7 ++++--- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4c0fff7..8f441cc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +ion3 (20070506-2) unstable; urgency=low + + * Applied upstream version check to upgrades as well as first + installation + * Restored links in ion3-dev - closes: #425287 + + -- Ben Hutchings Sun, 20 May 2007 19:45:37 +0100 + ion3 (20070506-1) unstable; urgency=low * Per Olofsson retired as co-maintainer diff --git a/debian/ion3.postinst b/debian/ion3.postinst index 3085013..f8e8fd9 100644 --- a/debian/ion3.postinst +++ b/debian/ion3.postinst @@ -3,9 +3,11 @@ set -e . /usr/share/debconf/confmodule UPSTREAM_VERSION= +DEBIAN_VERSION= -if [ "$1" = configure -a "$2" = "" ]; then - # Installing for the first time (or after a purge). +if [ "$1" = configure ] \ + && dpkg --compare-versions "$2" lt "$DEBIAN_VERSION"; then + # Installing for the first time or upgrading. # To comply with the Ion trademark licence terms, we must ensure # that this version is up-to-date or that the user acknowledges # it is not. I freely admit that this is a horrible abuse of diff --git a/debian/rules b/debian/rules index d9c6418..deb88ee 100755 --- a/debian/rules +++ b/debian/rules @@ -13,7 +13,8 @@ PACKAGE_DOC := $(PACKAGE)-doc INSTDIR := debian/$(PACKAGE) INSTDIR_DEV := debian/$(PACKAGE_DEV) INSTDIR_DOC := debian/$(PACKAGE_DOC) -UPSTREAM_VERSION := $(shell dpkg-parsechangelog | sed -r 's/^Version: ([0-9]*:)?(.*)-[^-]*$$/\2/; t; d') +DEBIAN_VERSION := $(shell dpkg-parsechangelog | sed -r 's/^Version: //; t; d') +UPSTREAM_VERSION := $(shell echo $(DEBIAN_VERSION) | sed -r 's/^[0-9]*://; s/-[^-]*$$//') doc-orig: cp -R doc doc-orig @@ -109,7 +110,7 @@ binary-indep: build-indep install-indep # dh_installinfo -i # dh_undocumented -i # dh_installman -i -# dh_link -i + dh_link -i # dh_strip -i dh_compress -i dh_fixperms -i @@ -160,7 +161,7 @@ binary-arch: build-arch install-arch # dh_python -a # dh_makeshlibs -a dh_installdeb -a - sed -i 's/^UPSTREAM_VERSION=/UPSTREAM_VERSION=$(UPSTREAM_VERSION)/' \ + sed -i 's/^DEBIAN_VERSION=/&$(DEBIAN_VERSION)/; s/^UPSTREAM_VERSION=/&$(UPSTREAM_VERSION)/' \ debian/ion3/DEBIAN/postinst dh_shlibdeps -a dh_gencontrol -a -- 2.39.2