[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#520753: ghostscript: diff for NMU version 9.05~dfsg-6.3



tags 520753 + pending
thanks

Dear maintainer,

I've prepared an NMU for ghostscript (versioned as 9.05~dfsg-6.3) and
uploaded it to DELAYED/1. Please feel free to tell me if I
should delay it longer.

Regards.
diff -Nru ghostscript-9.05~dfsg/debian/changelog ghostscript-9.05~dfsg/debian/changelog
--- ghostscript-9.05~dfsg/debian/changelog	2012-10-27 12:08:23.000000000 +0200
+++ ghostscript-9.05~dfsg/debian/changelog	2012-11-25 14:39:31.000000000 +0100
@@ -1,3 +1,12 @@
+ghostscript (9.05~dfsg-6.3) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Replace the PPD-updater postinst by CUPS' trigger (Closes: #520753)
+    - Breaks against too old cups versions.
+    - Add a ppd-updater file, to trigger with parameters.
+
+ -- Didier Raboud <odyx@debian.org>  Sun, 25 Nov 2012 14:39:30 +0100
+
 ghostscript (9.05~dfsg-6.2) unstable; urgency=medium
 
   * Check for the existence of /etc/cups/ppd in ghostscript-cups.postinst
diff -Nru ghostscript-9.05~dfsg/debian/control.in ghostscript-9.05~dfsg/debian/control.in
--- ghostscript-9.05~dfsg/debian/control.in	2012-10-27 12:09:27.000000000 +0200
+++ ghostscript-9.05~dfsg/debian/control.in	2012-11-25 14:45:02.000000000 +0100
@@ -42,6 +42,7 @@
 Conflicts: ${cdbs:Conflicts}
 Replaces: ${cdbs:Replaces}
 Provides: ${cdbs:Provides}
+Breaks: cups (<< 1.5.0-2~)
 Description: interpreter for the PostScript language and for PDF - CUPS filters
  GPL Ghostscript is used for PostScript/PDF preview and printing.
  Usually as a back-end to a program such as ghostview, it can display
diff -Nru ghostscript-9.05~dfsg/debian/control.in.in ghostscript-9.05~dfsg/debian/control.in.in
--- ghostscript-9.05~dfsg/debian/control.in.in	2012-05-24 18:57:49.000000000 +0200
+++ ghostscript-9.05~dfsg/debian/control.in.in	2012-11-25 14:37:00.000000000 +0100
@@ -42,6 +42,7 @@
 Conflicts: ${cdbs:Conflicts}
 Replaces: ${cdbs:Replaces}
 Provides: ${cdbs:Provides}
+Breaks: cups (<< 1.5.0-2~)
 Description: interpreter for the PostScript language and for PDF - CUPS filters
  GPL Ghostscript is used for PostScript/PDF preview and printing.
  Usually as a back-end to a program such as ghostview, it can display
diff -Nru ghostscript-9.05~dfsg/debian/ghostscript-cups.install ghostscript-9.05~dfsg/debian/ghostscript-cups.install
--- ghostscript-9.05~dfsg/debian/ghostscript-cups.install	2012-05-24 18:57:49.000000000 +0200
+++ ghostscript-9.05~dfsg/debian/ghostscript-cups.install	2012-11-25 14:37:00.000000000 +0100
@@ -5,3 +5,6 @@
 
 usr/lib/cups/filter/
 usr/share/ppd/
+
+# Cups triggering file
+debian/ghostscript-cups.ppd-updater	usr/share/cups/ppd-updaters/
diff -Nru ghostscript-9.05~dfsg/debian/ghostscript-cups.postinst ghostscript-9.05~dfsg/debian/ghostscript-cups.postinst
--- ghostscript-9.05~dfsg/debian/ghostscript-cups.postinst	2012-10-27 12:09:20.000000000 +0200
+++ ghostscript-9.05~dfsg/debian/ghostscript-cups.postinst	1970-01-01 01:00:00.000000000 +0100
@@ -1,61 +0,0 @@
-#! /bin/bash
-
-set -e
-
-# Limit lp* commands to localhost to avoid hanging. See bug#543468
-lpopts='-h /var/run/cups/cups.sock'
-
-case "$1" in
-    configure)
-	# Do the following only if CUPS is running and the needed CUPS tools
-	# are available
-	if which lpstat > /dev/null 2>&1 \
-	  && which lpinfo > /dev/null 2>&1 \
-	  && which lpadmin > /dev/null 2>&1 \
-          && test -d /etc/cups/ppd \
-	  && LC_ALL=C lpstat $lpopts -r > /dev/null 2>&1; then
-		# Update the PPD files of all already installed print queues
-		driverregexp='lsb/usr/ghostscript/'
-		gennicknameregexp=''
-		[ ! -z "$gennicknameregexp" ] \
-		  && gennicknameregexp="; $gennicknameregexp"
-		gennicknameregexp='s/\s*\(recommended\)//'"$gennicknameregexp"
-		tempfiles=
-		trap 'rm -f $tempfiles; exit 0' 0 HUP INT QUIT ILL ABRT PIPE TERM
-		tmpfile1=`mktemp -t updateppds.XXXXXX`
-		tempfiles="$tempfiles $tmpfile1"
-		lpinfo $lpopts -m | grep -E $driverregexp > $tmpfile1
-		cd /etc/cups/ppd
-		for ppd in *.ppd; do
-			[ -r "$ppd" ] || continue
-			queue=${ppd%.ppd}
-			lpstat $lpopts -p "$queue" >/dev/null 2>&1 || continue
-			nickname=`grep '\*NickName:' "$ppd" | cut -d '"' -f 2 | perl -p -e 's/\n$//' | perl -p -e "$gennicknameregexp" | perl -p -e 's/(\W)/\\\\$1/g'`
-			lang=`grep '\*LanguageVersion:' "$ppd" | cut -d ' ' -f 2 | perl -e 'print lc(<>)' | perl -p -e 's/[\r\n]//gs'`
-			ppdfound="0"
-			englishppduri=""
-			tmpfile2=`mktemp -t updateppds.XXXXXX`
-			tempfiles="$tempfiles $tmpfile2"
-			cat $tmpfile1 | perl -p -e "$gennicknameregexp" | grep -E '^\S+\s+.*'"$nickname"'$' | cut -d ' ' -f 1 > $tmpfile2
-			while read newppduri; do
-				[ "$ppdfound" = "0" ] && lpadmin $lpopts -p "$queue" -m $newppduri 2>/dev/null || continue
-				newlang=`grep '\*LanguageVersion:' "$ppd" | cut -d ' ' -f 2 | perl -e 'print lc(<>)' | perl -p -e 's/[\r\n]//gs'`
-				[ "$newlang" = "$lang" ] && ppdfound="1"
-				[ "$newlang" = "english" ] && englishppduri="$newppduri"
-			done < $tmpfile2
-			[ "$ppdfound" = "0" ] && [ ! -z "$englishppduri" ] && lpadmin $lpopts -p "$queue" -m $englishppduri 2>/dev/null && ppdfound="1"
-			[ "$ppdfound" = "1" ] && echo PPD for printer $queue updated >&2
-		done
-	fi
-	;;
-    abort-upgrade|abort-remove|abort-deconfigure)
-	;;
-    *)
-	echo "postinst called with unknown argument \`$1'" >&2
-	exit 1
-	;;
-esac
-
-#DEBHELPER#
-
-exit 0
diff -Nru ghostscript-9.05~dfsg/debian/ghostscript-cups.ppd-updater ghostscript-9.05~dfsg/debian/ghostscript-cups.ppd-updater
--- ghostscript-9.05~dfsg/debian/ghostscript-cups.ppd-updater	1970-01-01 01:00:00.000000000 +0100
+++ ghostscript-9.05~dfsg/debian/ghostscript-cups.ppd-updater	2012-11-25 14:37:00.000000000 +0100
@@ -0,0 +1,2 @@
+DRIVER_REGEXP='lsb/usr/ghostscript/'
+GENNICKNAME_REGEXP=''

Reply to: