Subject: Re: bug#9773: "make install-info" with DESTDIR writes unwanted usr/share/info/dir.gz

From: Stefano Lattarini <[email-masked]>
Date: Sat, 22 Oct 2011 21:05:30 +0200

On Monday 17 October 2011, Jonathan Nieder wrote:
> Hi,
Hi Jonathan, sorry for the delay.

> [SNIP]
>
> In other words, how about this patch?  Untested for now.
> ---
> [1] http://bugs.debian.org/543992
> [2] http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=25;bug=543992
> 
>  ChangeLog          |   13 +++++++++++++
>  lib/am/texinfos.am |   15 +++------------
>  2 files changed, 16 insertions(+), 12 deletions(-)
> 
> diff --git a/ChangeLog b/ChangeLog
> index 4a470bd..40d0d5d 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,16 @@
> +2011-10-17  Jonathan Nieder  <[email-masked]>
> +
> +	For Debian Bug#543992:
> +	* lib/am/texinfos.am (install-info-am): When deciding whether to
> +	add to an info/dir file, instead of checking for Debian
> +	install-info, check if DESTDIR is nonempty.  Debian install-info
> +	--version does not print "debian" nowadays, so the existing test
> +	was never triggering.  Without this change, when preparing a
> +	tarball or package in order to install it later, packagers would
> +	have to remove install-info first or remove the dir file
> +	afterward to avoid clobbering /usr/share/info/dir on the target
> +	system.
> +
I must say that I don't like this very much.  A better fix IMHO would
be to have an environment variable to inhibit the creation/updating of
the `${infodir}/dir' file, rather than trying to guess the user's
intentions by looking at $(DESTDIR) behind his back.  But I don't know
exactly how the creation of debian packages work, so I can't tell
whether my proposed solution would satisfy the packagers or not.
Opinions?  Objections?

Thanks,
  Stefano