Quoting Paul Wise (p...@debian.org):
> On Wed, Nov 16, 2011 at 2:04 AM, Christian Perrier wrote:
> 
> > A proposed patch is attached to this bug report.
> 
> This patch is incorrect, the defoma-app purge should happen in the
> preinst or postinst of the new package.


Indeed, as we discussed later, this should be a "defoma-font purge
<hint_file>" call. As a consequence, it should happen before the
former version is removed and the hints file purge, thus in prerm.

Modified patch attached.


diff -Nru gsfonts-other-6.0.old/debian/changelog gsfonts-other-6.0/debian/changelog
--- gsfonts-other-6.0.old/debian/changelog	2011-11-15 18:48:12.233959420 +0100
+++ gsfonts-other-6.0/debian/changelog	2011-11-15 19:02:11.683887556 +0100
@@ -1,3 +1,9 @@
+gsfonts-other (6.0-3.3) UNRELEASED; urgency=low
+
+  * Drop defoma support
+
+ -- Christian Perrier <bubu...@debian.org>  Tue, 15 Nov 2011 19:01:57 +0100
+
 gsfonts-other (6.0-3.2) unstable; urgency=low
 
   * Non-maintainer upload.
diff -Nru gsfonts-other-6.0.old/debian/control gsfonts-other-6.0/debian/control
--- gsfonts-other-6.0.old/debian/control	2011-11-15 18:48:12.233959420 +0100
+++ gsfonts-other-6.0/debian/control	2011-11-15 18:49:16.519621751 +0100
@@ -8,7 +8,6 @@
 Architecture: all
 Section: non-free/text
 Priority: optional
-Depends: defoma
 Description: Additional fonts for the ghostscript interpreter
  This package contains a miscellaneous set of fonts, including
  Cyrillic, kana, and fonts derived from the free Hershey fonts, with
diff -Nru gsfonts-other-6.0.old/debian/gsfonts-other.hints gsfonts-other-6.0/debian/gsfonts-other.hints
--- gsfonts-other-6.0.old/debian/gsfonts-other.hints	2011-11-15 18:48:12.233959420 +0100
+++ gsfonts-other-6.0/debian/gsfonts-other.hints	1970-01-01 01:00:00.000000000 +0100
@@ -1,541 +0,0 @@
-######################################################################
-# UTOPIA
-
-category type1
-
-begin /usr/share/ghostscript/fonts/putr.pfa
-  FontName = Utopia-Regular
-  Charset = ISO8859-1
-  Family = Utopia
-  GeneralFamily = Roman
-  Weight = Medium
-  Width = Variable
-  Shape = Upright Serif
-  Priority = 20
-  X-FontName = -adobe-utopia-regular-r-normal--0-0-0-0-p-0-iso8859-1
-  Foundry = Adobe
-end
-
-begin /usr/share/ghostscript/fonts/putb.pfa
-  FontName = Utopia-Bold
-  Charset = ISO8859-1
-  Family = Utopia
-  GeneralFamily = Roman
-  Weight = Bold
-  Width = Variable
-  Shape = Upright Serif
-  Priority = 20
-  X-FontName = -adobe-utopia-bold-r-normal--0-0-0-0-p-0-iso8859-1
-  Foundry = Adobe
-end
-
-begin /usr/share/ghostscript/fonts/putri.pfa
-  FontName = Utopia-Italic
-  Charset = ISO8859-1
-  Family = Utopia
-  GeneralFamily = Roman
-  Weight = Medium
-  Width = Variable
-  Shape = Italic Serif
-  Priority = 20
-  X-FontName = -adobe-utopia-regular-i-normal--0-0-0-0-p-0-iso8859-1
-  Foundry = Adobe
-end
-
-begin /usr/share/ghostscript/fonts/putbi.pfa
-  FontName = Utopia-BoldItalic
-  Charset = ISO8859-1
-  Family = Utopia
-  GeneralFamily = Roman
-  Weight = Bold
-  Width = Variable
-  Shape = Italic Serif
-  Priority = 20
-  X-FontName = -adobe-utopia-bold-i-normal--0-0-0-0-p-0-iso8859-1
-  Foundry = Adobe
-end
-
-######################################################################
-# Charter
-
-category type1
-
-begin /usr/share/ghostscript/fonts/bchr.pfa
-  FontName = CharterBT-Roman
-  Charset = ISO8859-1
-  Family = Utopia
-  GeneralFamily = Roman
-  Weight = Medium
-  Width = Variable
-  Shape = Upright Serif
-  Priority = 20
-  X-FontName = -bitstream-charter-regular-r-normal--0-0-0-0-p-0-iso8859-1
-  Foundry = Bitstream
-end
-
-begin /usr/share/ghostscript/fonts/bchb.pfa
-  FontName = CharterBT-Bold
-  Charset = ISO8859-1
-  Family = Utopia
-  GeneralFamily = Roman
-  Weight = Bold
-  Width = Variable
-  Shape = Upright Serif
-  Priority = 20
-  X-FontName = -bitstream-charter-bold-r-normal--0-0-0-0-p-0-iso8859-1
-  Foundry = Bitstream
-end
-
-begin /usr/share/ghostscript/fonts/bchri.pfa
-  FontName = CharterBT-Italic
-  Charset = ISO8859-1
-  Family = Utopia
-  GeneralFamily = Roman
-  Weight = Medium
-  Width = Variable
-  Shape = Italic Serif
-  Priority = 20
-  X-FontName = -bitstream-charter-regular-i-normal--0-0-0-0-p-0-iso8859-1
-  Foundry = Bitstream
-end
-
-begin /usr/share/ghostscript/fonts/bchbi.pfa
-  FontName = CharterBT-BoldItalic
-  Charset = ISO8859-1
-  Family = Utopia
-  GeneralFamily = Roman
-  Weight = Bold
-  Width = Variable
-  Shape = Italic Serif
-  Priority = 20
-  X-FontName = -bitstream-charter-bold-i-normal--0-0-0-0-p-0-iso8859-1
-  Foundry = Bitstream
-end
-
-######################################################################
-# Hershey Plain
-
-category type3
-
-begin /usr/share/ghostscript/fonts/hrplr.gsf
-  FontName = Hershey-Plain
-end
-
-category gsfontderivative
-begin /usr/share/ghostscript/fonts/hrplrb.gsf
-  FontName = Hershey-Plain-Bold
-  GSF-OriginFont = /usr/share/ghostscript/fonts/hrplr.gsf
-  GSF-OriginID = Hershey-Plain
-end
-
-begin /usr/share/ghostscript/fonts/hrplro.gsf
-  FontName = Hershey-Plain-Oblique
-  GSF-OriginFont = /usr/share/ghostscript/fonts/hrplr.gsf
-  GSF-OriginID = Hershey-Plain
-end
-
-begin /usr/share/ghostscript/fonts/hrplrbo.gsf
-  FontName = Hershey-Plain-Bold-Oblique
-  GSF-OriginFont = /usr/share/ghostscript/fonts/hrplr.gsf
-  GSF-OriginID = Hershey-Plain
-end
-
-######################################################################
-# Hershey Plain Simplex
-
-category type3
-
-begin /usr/share/ghostscript/fonts/hrpls.gsf
-  FontName = Hershey-Plain-Simplex
-end
-
-category gsfontderivative
-begin /usr/share/ghostscript/fonts/hrplsb.gsf
-  FontName = Hershey-Plain-Simplex-Bold
-  GSF-OriginFont = /usr/share/ghostscript/fonts/hrpls.gsf
-  GSF-OriginID = Hershey-Plain-Simplex
-end
-
-begin /usr/share/ghostscript/fonts/hrplso.gsf
-  FontName = Hershey-Plain-Simplex-Oblique
-  GSF-OriginFont = /usr/share/ghostscript/fonts/hrpls.gsf
-  GSF-OriginID = Hershey-Plain-Simplex
-end
-
-begin /usr/share/ghostscript/fonts/hrplsbo.gsf
-  FontName = Hershey-Plain-Simplex-Bold-Oblique
-  GSF-OriginFont = /usr/share/ghostscript/fonts/hrpls.gsf
-  GSF-OriginID = Hershey-Plain-Simplex
-end
-
-######################################################################
-# Hershey Plain Duplex
-
-category type1
-
-begin /usr/share/ghostscript/fonts/hrpld.pfa
-  FontName = Hershey-Plain-Duplex
-  Charset = ISO8859-1
-  Family = HersheyPlainDuplex
-  GeneralFamily = Roman
-  Weight = Medium
-  Width = Variable
-  Shape = Upright Serif
-  Priority = 20
-  Foundry = Hershey
-end
-
-begin /usr/share/ghostscript/fonts/hrpldi.pfa
-  FontName = Hershey-Plain-Duplex-Italic
-  Charset = ISO8859-1
-  Family = HersheyPlainDuplex
-  GeneralFamily = Roman
-  Weight = Medium
-  Width = Variable
-  Shape = Italic Serif
-  Priority = 20
-  Foundry = Hershey
-end
-
-category gsfontderivative
-
-begin /usr/share/ghostscript/fonts/hrpldb.gsf
-  FontName = Hershey-Plain-Duplex-Bold
-  Charset = ISO8859-1
-  Family = HersheyPlainDuplex
-  GeneralFamily = Roman
-  Weight = Bold
-  Width = Variable
-  Shape = Upright Serif
-  Priority = 20
-  Foundry = Hershey
-  GSF-OriginID = Hershey-Plain-Duplex
-  GSF-OriginFont = /usr/share/ghostscript/fonts/hrpld.pfa
-end
-
-begin /usr/share/ghostscript/fonts/hrpldbi.gsf
-  FontName = Hershey-Plain-Duplex-Bold-Italic
-  Charset = ISO8859-1
-  Family = HersheyPlainDuplex
-  GeneralFamily = Roman
-  Weight = Bold
-  Width = Variable
-  Shape = Italic Serif
-  Priority = 20
-  Foundry = Hershey
-  GSF-OriginID = Hershey-Plain-Duplex-Italic
-  GSF-OriginFont = /usr/share/ghostscript/fonts/hrpldi.pfa
-end
-
-######################################################################
-# Hershey Plain Triplex
-
-category type1
-
-begin /usr/share/ghostscript/fonts/hrplt.pfa
-  FontName = Hershey-Plain-Triplex
-  Charset = ISO8859-1
-  Family = HersheyPlainTriplx
-  GeneralFamily = Roman
-  Weight = Medium
-  Width = Variable
-  Shape = Upright Serif
-  Priority = 20
-  Foundry = Hershey
-end
-
-begin /usr/share/ghostscript/fonts/hrplti.pfa
-  FontName = Hershey-Plain-Triplex-Italic
-  Charset = ISO8859-1
-  Family = HersheyPlainTriplex
-  GeneralFamily = Roman
-  Weight = Medium
-  Width = Variable
-  Shape = Italic Serif
-  Priority = 20
-  Foundry = Hershey
-end
-
-category gsfontderivative
-
-begin /usr/share/ghostscript/fonts/hrpltb.gsf
-  FontName = Hershey-Plain-Triplex-Bold
-  Charset = ISO8859-1
-  Family = HersheyPlainTriplex
-  GeneralFamily = Roman
-  Weight = Bold
-  Width = Variable
-  Shape = Upright Serif
-  Priority = 20
-  Foundry = Hershey
-  GSF-OriginID = Hershey-Plain-Triplex
-  GSF-OriginFont = /usr/share/ghostscript/fonts/hrplt.pfa
-end
-
-begin /usr/share/ghostscript/fonts/hrpltbi.gsf
-  FontName = Hershey-Plain-Triplex-Bold-Italic
-  Charset = ISO8859-1
-  Family = HersheyPlainTriplex
-  GeneralFamily = Roman
-  Weight = Bold
-  Width = Variable
-  Shape = Italic Serif
-  Priority = 20
-  Foundry = Hershey
-  GSF-OriginID = Hershey-Plain-Triplex-Italic
-  GSF-OriginFont = /usr/share/ghostscript/fonts/hrplti.pfa
-end
-
-######################################################################
-# Hershey Script Simplex
-
-category type1
-
-begin /usr/share/ghostscript/fonts/hrscs.pfa
-  FontName = Hershey-Script-Simplex
-  Charset = ISO8859-1
-  Family = HersheyScriptSimplex
-  GeneralFamily = Script
-  Weight = Medium
-  Width = Variable
-  Shape = Upright Serif
-  Priority = 20
-  Foundry = Hershey
-end
-
-category gsfontderivative
-
-begin /usr/share/ghostscript/fonts/hrscsb.gsf
-  FontName = Hershey-Script-Simplex-Bold
-  Charset = ISO8859-1
-  Family = HersheyScriptSimplex
-  GeneralFamily = Script
-  Weight = Bold
-  Width = Variable
-  Shape = Upright Serif
-  Priority = 20
-  Foundry = Hershey
-  GSF-OriginID = Hershey-Script-Simplex
-  GSF-OriginFont = /usr/share/ghostscript/fonts/hrscs.pfa
-end
-
-begin /usr/share/ghostscript/fonts/hrscso.gsf
-  FontName = Hershey-Script-Simplex-Oblique
-  Charset = ISO8859-1
-  Family = HersheyScriptSimplex
-  GeneralFamily = Script
-  Weight = Medium
-  Width = Variable
-  Shape = Slanted Serif
-  Priority = 20
-  Foundry = Hershey
-  GSF-OriginID = Hershey-Script-Simplex
-  GSF-OriginFont = /usr/share/ghostscript/fonts/hrscs.pfa
-end
-
-######################################################################
-# Hershey Script Complex
-
-category type1
-
-begin /usr/share/ghostscript/fonts/hrscc.pfa
-  FontName = Hershey-Script-Complex
-  Charset = ISO8859-1
-  Family = HersheyScriptComplex
-  GeneralFamily = Script
-  Weight = Medium
-  Width = Variable
-  Shape = Upright Serif
-  Priority = 20
-  Foundry = Hershey
-end
-
-category gsfontderivative
-
-begin /usr/share/ghostscript/fonts/hrsccb.gsf
-  FontName = Hershey-Script-Complex-Bold
-  Charset = ISO8859-1
-  Family = HersheyScriptComplex
-  GeneralFamily = Script
-  Weight = Bold
-  Width = Variable
-  Shape = Upright Serif
-  Priority = 20
-  Foundry = Hershey
-  GSF-OriginID = Hershey-Script-Complex
-  GSF-OriginFont = /usr/share/ghostscript/fonts/hrscc.pfa
-end
-
-begin /usr/share/ghostscript/fonts/hrscco.gsf
-  FontName = Hershey-Script-Complex-Oblique
-  Charset = ISO8859-1
-  Family = HersheyScriptComplex
-  GeneralFamily = Script
-  Weight = Medium
-  Width = Variable
-  Shape = Slanted Serif
-  Priority = 20
-  Foundry = Hershey
-  GSF-OriginID = Hershey-Script-Complex
-  GSF-OriginFont = /usr/share/ghostscript/fonts/hrscc.pfa
-end
-
-######################################################################
-# Hershey Gothic English
-
-category type1
-
-begin /usr/share/ghostscript/fonts/hrger.pfa
-  FontName = Hershey-Gothic-English
-  Charset = ISO8859-1
-  Family = HersheyGothicEnglish
-  GeneralFamily = Gothic
-  Weight = Medium
-  Width = Variable
-  Shape = Upright Serif
-  Priority = 20
-  Foundry = Hershey
-end
-
-category gsfontderivative
-
-begin /usr/share/ghostscript/fonts/hrgerb.gsf
-  FontName = Hershey-Gothic-English-Bold
-  GSF-OriginFont = /usr/share/ghostscript/fonts/hrger.pfa
-  GSF-OriginID = Hershey-Gothic-English
-end
-
-begin /usr/share/ghostscript/fonts/hrgerd.gsf
-  FontName = Hershey-Gothic-English-SemiBold
-  GSF-OriginFont = /usr/share/ghostscript/fonts/hrger.pfa
-  GSF-OriginID = Hershey-Gothic-English
-end
-
-begin /usr/share/ghostscript/fonts/hrgero.gsf
-  FontName = Hershey-Gothic-English-Oblique
-  GSF-OriginFont = /usr/share/ghostscript/fonts/hrger.pfa
-  GSF-OriginID = Hershey-Gothic-English
-end
-
-######################################################################
-# Hershey Gothic German
-
-category type1
-
-begin /usr/share/ghostscript/fonts/hrgrr.pfa
-  FontName = Hershey-Gothic-German
-  Charset = ISO8859-1
-  Family = HersheyGothicGerman
-  GeneralFamily = Gothic
-  Weight = Medium
-  Width = Variable
-  Shape = Upright Serif
-  Priority = 20
-  Foundry = Hershey
-end
-
-category gsfontderivative
-
-begin /usr/share/ghostscript/fonts/hrgrrb.gsf
-  FontName = Hershey-Gothic-German-Bold
-  GSF-OriginFont = /usr/share/ghostscript/fonts/hrgrr.pfa
-  GSF-OriginID = Hershey-Gothic-German
-end
-
-begin /usr/share/ghostscript/fonts/hrgrro.gsf
-  FontName = Hershey-Gothic-German-Oblique
-  GSF-OriginFont = /usr/share/ghostscript/fonts/hrgrr.pfa
-  GSF-OriginID = Hershey-Gothic-German
-end
-
-######################################################################
-# Hershey Gothic Italian
-
-category type1
-
-begin /usr/share/ghostscript/fonts/hritr.pfa
-  FontName = Hershey-Gothic-Italian
-  Charset = ISO8859-1
-  Family = HersheyGothicItalian
-  GeneralFamily = Gothic
-  Weight = Medium
-  Width = Variable
-  Shape = Upright Serif
-  Priority = 20
-  Foundry = Hershey
-end
-
-category gsfontderivative
-
-begin /usr/share/ghostscript/fonts/hritrb.gsf
-  FontName = Hershey-Gothic-Italian-Bold
-  GSF-OriginFont = /usr/share/ghostscript/fonts/hritr.pfa
-  GSF-OriginID = Hershey-Gothic-Italian
-end
-
-begin /usr/share/ghostscript/fonts/hritro.gsf
-  FontName = Hershey-Gothic-Italian-Oblique
-  GSF-OriginFont = /usr/share/ghostscript/fonts/hritr.pfa
-  GSF-OriginID = Hershey-Gothic-Italian
-end
-
-######################################################################
-# Hershey Greek
-
-category type3
-
-begin /usr/share/ghostscript/fonts/hrgks.gsf
-  FontName = Hershey-Greek-Simplex
-end
-
-begin /usr/share/ghostscript/fonts/hrgkc.gsf
-  FontName = Hershey-Greek-Complex
-end
-
-######################################################################
-# Hershey (other)
-
-category type3
-
-begin /usr/share/ghostscript/fonts/hrsyr.gsf
-  FontName = Hershey-Symbol
-end
-
-######################################################################
-# URW Aniqua and Grotesk
-
-category type3
-
-begin /usr/share/ghostscript/fonts/u003043t.gsf
-  FontName = URWAntiquaT-RegularCondensed
-end
-
-begin /usr/share/ghostscript/fonts/u004006t.gsf
-  FontName = URWGroteskT-Bold
-end
-
-######################################################################
-# Cyriliic
-
-category type1
-
-begin /usr/share/ghostscript/fonts/fcyr.gsf
-  FontName = Cyrillic
-end
-
-begin /usr/share/ghostscript/fonts/fcyri.gsf
-  FontName = Cyrillic-Italic
-end
-
-######################################################################
-# Calligraphic Japanese
-
-category type1
-
-begin /usr/share/ghostscript/fonts/fhirw.gsf
-  FontName = Calligraphic-Hiragana
-end
-
-begin /usr/share/ghostscript/fonts/fkarw.gsf
-  FontName = Calligraphic-Katakana
-end
diff -Nru gsfonts-other-6.0.old/debian/postinst gsfonts-other-6.0/debian/postinst
--- gsfonts-other-6.0.old/debian/postinst	2011-11-15 18:48:12.233959420 +0100
+++ gsfonts-other-6.0/debian/postinst	2011-11-15 18:52:11.352142764 +0100
@@ -1,14 +1,12 @@
 #! /bin/sh -e
 
-if [ "$1" = configure ]; then
-    echo -n "(Re-)registering Postscript fonts..."
-    defoma-font -q reregister-all /etc/defoma/hints/gsfonts-other.hints
-    echo done
-fi
-
 if [ "$1" = "configure" ]; then
 	if [ -d /usr/doc -a ! -h /usr/doc/gsfonts-other -a -d /usr/share/doc/gsfonts-other ]; then
 		rm -f /usr/doc/gsfonts-other
 	fi
 fi
 
+if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then
+  dpkg-maintscript-helper rm_conffile /etc/defoma/hints/gsfonts-other.hints 6.0-3.3 -- "$@"
+fi
+  
diff -Nru gsfonts-other-6.0.old/debian/postrm gsfonts-other-6.0/debian/postrm
--- gsfonts-other-6.0.old/debian/postrm	2011-11-15 18:48:12.233959420 +0100
+++ gsfonts-other-6.0/debian/postrm	2011-11-19 14:32:21.982873555 +0100
@@ -2,9 +2,6 @@
 
 set -e
 
-if [ "$1" = remove ]; then
-    echo -n "Unregistering Postscript fonts..."
-    defoma-font -qt purge-all /etc/defoma/hints/gsfonts-other.hints
-    echo done
+if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then
+  dpkg-maintscript-helper rm_conffile /etc/defoma/hints/gsfonts-other.hints 6.0-3.3 -- "$@"
 fi
-
diff -Nru gsfonts-other-6.0.old/debian/preinst gsfonts-other-6.0/debian/preinst
--- gsfonts-other-6.0.old/debian/preinst	1970-01-01 01:00:00.000000000 +0100
+++ gsfonts-other-6.0/debian/preinst	2011-11-19 14:32:18.878787882 +0100
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+set -e
+
+if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then
+  dpkg-maintscript-helper rm_conffile /etc/defoma/hints/gsfonts-other.hints 6.0-3.3 -- "$@"
+fi
diff -Nru gsfonts-other-6.0.old/debian/prerm gsfonts-other-6.0/debian/prerm
--- gsfonts-other-6.0.old/debian/prerm	2011-11-15 18:48:12.233959420 +0100
+++ gsfonts-other-6.0/debian/prerm	2011-11-19 14:33:39.513013167 +0100
@@ -3,3 +3,9 @@
 if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/gsfonts-other ]; then
 	rm -f /usr/doc/gsfonts-other
 fi
+
+if dpkg --compare-versions "$2" lt 6.0.3-3.3; then
+	if [ -x "which defoma-font 2>/dev/null" ]; then
+		defoma-font purge-all /etc/defoma/hints/gsfonts-other.hints
+	fi
+fi
diff -Nru gsfonts-other-6.0.old/debian/rules gsfonts-other-6.0/debian/rules
--- gsfonts-other-6.0.old/debian/rules	2011-11-15 18:48:12.233959420 +0100
+++ gsfonts-other-6.0/debian/rules	2011-11-15 18:58:08.413596807 +0100
@@ -45,10 +45,6 @@
 	install -o root -g root -m 0644 \
 	  debian/changelog \
 	  debian/tmp/usr/share/doc/gsfonts-other/changelog.Debian
-	install -d -o root -g root -m 0755 debian/tmp/etc/defoma/hints
-	install -o root -g root -m 0644 \
-	  debian/gsfonts-other.hints \
-	  debian/tmp/etc/defoma/hints/
 	gzip -9v debian/tmp/usr/share/doc/gsfonts-other/* 
 	install -o root -g root -m 0644 \
 	  debian/copyright debian/tmp/usr/share/doc/gsfonts-other/copyright

Attachment: signature.asc
Description: Digital signature

Reply via email to