Bug#546165: install-info should not complain when called with --remove in prerm

2009-09-14 Thread Sven Joachim
tags 546165 + patch
thanks

On 2009-09-11 12:38 +0200, Raphaël Hertzog wrote:

 Package: install-info
 Version: 4.13a.dfsg.1-4

 During upgrade this morning I saw:
 (Lecture de la base de données... 218733 fichiers et répertoires déjà 
 installés.)
 Préparation du remplacement de coreutils 7.5-4 (en utilisant 
 .../coreutils_7.5-5_i386.deb) ...
 Ignoring install-info called from maintainer script
 The package coreutils should be rebuild with new debhelper to get trigger 
 support
 Dépaquetage de la mise à jour de coreutils ...

 In fact, 7.5-5 doesn't contain any call to install-info only the old 7.5-4 did
 and it was rightfully called with --remove in prerm. Please make install-info
 not complain when called with --remove in prerm otherwise we will have plenty
 of those messages during lenny-squeeze upgrades even if all packages have 
 been
 properly updated.

It seems that dpkg does not export information about which maintainer
script it is running (CMIIW; I just looked at the ENVIRONMENT VARIABLES
section in dpkg.1), so the best approach appears to be silent whenever
install-info is called with --remove or --remove-exactly options, as
these are usually set in prerm scripts.

Here is a patch that does that:

--8---cut here---start-8---
Index: install-info.sh
===
--- install-info.sh (Revision 4190)
+++ install-info.sh (Arbeitskopie)
@@ -17,6 +17,19 @@
   # we are running from a maintainer script, simply ignore the call
   # since we have trigger support and people should rebuild their
   # package with new debhelper which does not add calls to install-info
+  # Do not complain if called with --remove or --remove-exactly,
+  # as these are used in old packages' prerm scripts (see #546165)
+  while [ -n $1 ]; do
+  case $1 in
+  --remove|--remove-exactly)
+  exit 0
+  ;;
+  *)
+  shift
+  ;;
+  esac
+
+  done
   echo Ignoring install-info called from maintainer script 2
   echo The package $DPKG_MAINTSCRIPT_PACKAGE should be rebuilt with new 
debhelper to get trigger support 2
 fi
--8---cut here---end---8---

Cheers,
   Sven



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



Bug#546165: install-info should not complain when called with --remove in prerm

2009-09-11 Thread Raphaël Hertzog
Package: install-info
Version: 4.13a.dfsg.1-4

During upgrade this morning I saw:
(Lecture de la base de données... 218733 fichiers et répertoires déjà 
installés.)
Préparation du remplacement de coreutils 7.5-4 (en utilisant 
.../coreutils_7.5-5_i386.deb) ...
Ignoring install-info called from maintainer script
The package coreutils should be rebuild with new debhelper to get trigger 
support
Dépaquetage de la mise à jour de coreutils ...

In fact, 7.5-5 doesn't contain any call to install-info only the old 7.5-4 did
and it was rightfully called with --remove in prerm. Please make install-info
not complain when called with --remove in prerm otherwise we will have plenty
of those messages during lenny-squeeze upgrades even if all packages have been
properly updated.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (150, 
'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.30-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages install-info depends on:
ii  libc6 2.9-26 GNU C Library: Shared libraries

install-info recommends no packages.

install-info suggests no packages.

-- no debconf information



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