Jonas Smedegaard wrote:

> Lenny was the first stable release of
> Debian to contain the unified Ghostscript.

Thanks for clarifying.  Indeed I didn’t notice that, though I don’t
think it’s the main issue.

> I believe this is the past and future of gs-common:
> 
> Etch: ghostscript flavors depend on gs-common
> Lenny: ghostscript bogusly depends versioned on empty gs-common
> Squeeze: ghostscript depends unversioned on gs-common
> Squeeze+1: ghostscript need not depend on gs-common

Why not

 etch: ghostscript depends on gs-common
 lenny: ghostscript bogusly depends versioned on gs-common
 squeeze: gs-common exists but ghostscript does not depend on it
 shark: gs-common is removed

?  I thought that is what dummy packages were for --- maintaining
old package names and satisfying any versioned dependencies that
might still be around.

In other words, I still don’t see how the dependency of ghostscript on
gs-common serves any purpose.  It is not for the preinst, as explained
below.

>> The gs-common preinst seems to do some removal of old
>> alternatives; what is that about?  Is the old prerm broken?
>
> My guess is that the old packages did not properly clean up after
> themselves, and the convoluted transitions mad it impossible to fix
> that in the packages themselved (as they were dropped when it was
> discovered that cleanup was not good enough) so it was stuffed into
> the package that they transitioned into.

Aghh.  This part might be worrisome.

Checking gs-common from etch, I find no mention of alternatives:

 $ head -1 debian/changelog 
 gs-common (0.3.11) unstable; urgency=high
 $ grep alternatives debian/*

How about gs-gpl?

 $ head -1 debian/changelog 
 gs-gpl (8.54.dfsg.1-5etch2) oldstable-security; urgency=high
 $ grep alternatives debian/*
 debian/changelog:  * Do not run "update-alternatives --remove" when upgrade - 
closes: #163267
 debian/changelog:  * Make the package use update-alternatives so that 
different gs packages 
 debian/gs-gpl.postinst: update-alternatives --install /usr/bin/gs gs 
/usr/bin/gs-gpl 20 \
 debian/gs-gpl.postinst: update-alternatives --install /usr/bin/gs gs 
/usr/bin/gs-gpl 20 \
 debian/gs-gpl.prerm:    update-alternatives --remove gs /usr/bin/gs-gpl

Aha.

  * preinsts for each dummy packages now call update-alternatives
    to make sure gs symlinks are removed before the new ghostscript 
    package is installed - closes: #449173

I see now.  The problem: old gs-gpl et al do not remove alternatives
on upgrade, only on removal.  The solution: make the new dummy gs-gpl
et al remove alternatives in preinst.

gs-common has nothing to do with it, and to include
update-alternatives --remove calls in gs-common.preinst was imho a
mistake.

> Hope this helps,

It did indeed!

Thanks,
Jonathan
---
diff --git a/debian/changelog b/debian/changelog
index fe99abf..fb29ff3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+ghostscript (8.71~dfsg2-5) UNRELEASED; urgency=low
+
+  * Drop dependency from ghostscript on the transitional
+    gs-common package (Closes: #519141)
+  * Remove all alternatives handling from the gs-common
+    package.  gs-gpl et al already clean up after themselves.
+
+ -- Jonathan Nieder <jrnie...@gmail.com>  Wed, 04 Aug 2010 16:40:18 -0500
+
 ghostscript (8.71~dfsg2-4) unstable; urgency=medium
 
   * Fix CVE-2010-1628 (Closes: #584516)
diff --git a/debian/gs-common.preinst b/debian/gs-common.preinst
deleted file mode 100644
index b4ceabb..0000000
--- a/debian/gs-common.preinst
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-set -e
-
-case "$1" in
-    install|upgrade)
-       # Do away with update-alternative for /usr/bin/gs, we have one
-       # grand unified Ghostscript now!
-       if dpkg --compare-versions "$2" lt-nl "8.63.dfsg.1-1"; then
-               update-alternatives --remove-all gs || true
-               update-alternatives --remove-all gs.1 || true
-       fi
-
-       # Do away with update-alternative for /usr/bin/ps2pdf, upstream
-       # provides it as a script
-       if dpkg --compare-versions "$2" lt-nl "8.64~dfsg-1"; then
-               update-alternatives --remove-all ps2pdf || true
-       fi
-       ;;
-    abort-upgrade)
-       ;;
-    *)
-       echo "preinst called with unknown argument \`$1'" >&2
-       exit 1
-       ;;
-esac
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/rules b/debian/rules
index 02d56de..5f3d0cb 100755
--- a/debian/rules
+++ b/debian/rules
@@ -270,7 +270,6 @@ CDBS_CONFLICTS_ghostscript += , gs-cjk-resource (<< 
1.20010910-1)
 # Dropping gs-common closes: bug#539754
 CDBS_CONFLICTS_ghostscript += , gs-common (<< 8.63)
 CDBS_REPLACES_ghostscript += , gs-common (<< 8.63)
-CDBS_DEPENDS_ghostscript += , gs-common (>= 8.63.dfsg.1-1)
 CDBS_DEPENDS_gs-common += , ghostscript
 
 # Transitional quirk: gs-common dropped, functionality is in ghostscript
-- 



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to