GNU bug report logs - #10997
pkglibexecdir is unconditionally created when make install

Previous Next

Package: automake;

Reported by: Daiki Ueno <ueno <at> unixuser.org>

Date: Mon, 12 Mar 2012 05:45:01 UTC

Severity: minor

Tags: patch

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10997 in the body.
You can then email your comments to 10997 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-automake <at> gnu.org:
bug#10997; Package automake. (Mon, 12 Mar 2012 05:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daiki Ueno <ueno <at> unixuser.org>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Mon, 12 Mar 2012 05:45:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Daiki Ueno <ueno <at> unixuser.org>
To: bug-automake <at> gnu.org
Subject: pkglibexecdir is unconditionally created when make install
Date: Mon, 12 Mar 2012 13:55:40 +0900
[Message part 1 (text/plain, inline)]
I got a bug report for my package, which conditionally installs some
scripts into pkglibexecdir like this:

if ENABLE_FOO
pkglibexec_SCRIPTS = bar
endif

where pkglibexec* is not referred outside of if...endif.  When "make
install", automake creates pkglibexecdir even when ENABLE_FOO is false.

I'm attaching a prove which demonstrates the behavior.

[instdir-cond.test (application/octet-stream, attachment)]
[Message part 3 (text/plain, inline)]
Regards,
-- 
Daiki Ueno

Information forwarded to bug-automake <at> gnu.org:
bug#10997; Package automake. (Mon, 12 Mar 2012 11:23:02 GMT) Full text and rfc822 format available.

Message #8 received at 10997 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Daiki Ueno <ueno <at> unixuser.org>
Cc: 10997 <at> debbugs.gnu.org,
	"automake-patches <at> gnu.org" <automake-patches <at> gnu.org>
Subject: Re: bug#10997: pkglibexecdir is unconditionally created when make
	install
Date: Mon, 12 Mar 2012 11:52:47 +0100
[Message part 1 (text/plain, inline)]
severity 10997 minor
thanks

Hi Daiki, thanks for the report.

On 03/12/2012 05:55 AM, Daiki Ueno wrote:
> I got a bug report for my package, which conditionally installs some
> scripts into pkglibexecdir like this:
> 
> if ENABLE_FOO
> pkglibexec_SCRIPTS = bar
> endif
> 
> where pkglibexec* is not referred outside of if...endif.  When "make
> install", automake creates pkglibexecdir even when ENABLE_FOO is false.
> 
> I'm attaching a prove which demonstrates the behavior.
>
I agree it would be nice to avoid creating directories that are not actually
needed; still, this is a low-priority bug, and I'm not yet sure how difficult
it would be to fix.  For the moment, I've committed (in your name) the test
case you've sent us (with minor tweakings), so that the bug will at least
remain exposed in the testsuite.  Attached is the patch I've pushed (to maint).

Thanks,
  Stefano
[0001-coverage-expose-automake-bug-10997.patch (text/x-diff, attachment)]

Severity set to 'minor' from 'normal' Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 12 Mar 2012 11:23:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#10997; Package automake. (Mon, 12 Mar 2012 11:53:01 GMT) Full text and rfc822 format available.

Message #13 received at 10997 <at> debbugs.gnu.org (full text, mbox):

From: Peter Breitenlohner <peb <at> mppmu.mpg.de>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: Daiki Ueno <ueno <at> unixuser.org>, bug-automake <at> gnu.org,
	"automake-patches <at> gnu.org" <automake-patches <at> gnu.org>,
	10997 <at> debbugs.gnu.org
Subject: Re: bug#10997: pkglibexecdir is unconditionally created when make
	install
Date: Mon, 12 Mar 2012 12:21:51 +0100 (CET)
On Mon, 12 Mar 2012, Stefano Lattarini wrote:

> On 03/12/2012 05:55 AM, Daiki Ueno wrote:
>> I got a bug report for my package, which conditionally installs some
>> scripts into pkglibexecdir like this:
>>
>> if ENABLE_FOO
>> pkglibexec_SCRIPTS = bar
>> endif
>>
>> where pkglibexec* is not referred outside of if...endif.  When "make
>> install", automake creates pkglibexecdir even when ENABLE_FOO is false.
>>
>> I'm attaching a prove which demonstrates the behavior.
>>
> I agree it would be nice to avoid creating directories that are not actually
> needed; still, this is a low-priority bug, and I'm not yet sure how difficult
> it would be to fix.  For the moment, I've committed (in your name) the test
> case you've sent us (with minor tweakings), so that the bug will at least
> remain exposed in the testsuite.  Attached is the patch I've pushed (to maint).

Fixing this particular case might be fine, but please watch out.
In the quite similar (unconditional) case
  pkglibexec_SCRIPTS =
one might actually expect that that $(pkglibexecdir) is created
unconditionally.  (Perhaps because 'install-exec-local' or
'install-data-local' wants to install some files into that directory.)

In the TeX Live build system we actually use something quite analogous:
  nodist_bin_SCRIPTS =
  texmfdir = $(datarootdir)/texmf/scripts/xindy
  nodist_texmf_SCRIPTS = texindy.pl xindy.pl
  install-data-hook: install-perl-links
where 'install-perl-links' installs in $(bindir) the symbolic links
'texindy' and 'xindy' pointing to the respective perl scripts in
$(texmfdir).

To summarize: 'nodist_bin_SCRIPTS =' is an extremely convenient way to
ensure that $(bindir) -- or rather $(DESTDIR)$(bindir) -- exists.

Regards
Peter Breitenlohner <peb <at> mppmu.mpg.de>




Information forwarded to bug-automake <at> gnu.org:
bug#10997; Package automake. (Mon, 12 Mar 2012 12:18:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#10997; Package automake. (Mon, 12 Mar 2012 14:14:02 GMT) Full text and rfc822 format available.

Message #19 received at 10997 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Peter Breitenlohner <peb <at> mppmu.mpg.de>
Cc: Daiki Ueno <ueno <at> unixuser.org>, bug-automake <at> gnu.org,
	"automake-patches <at> gnu.org" <automake-patches <at> gnu.org>,
	10997 <at> debbugs.gnu.org
Subject: Re: bug#10997: pkglibexecdir is unconditionally created when make
	install
Date: Mon, 12 Mar 2012 14:43:39 +0100
[Message part 1 (text/plain, inline)]
On 03/12/2012 12:21 PM, Peter Breitenlohner wrote:
>
> Fixing this particular case might be fine, but please watch out.
> In the quite similar (unconditional) case
>   pkglibexec_SCRIPTS =
> one might actually expect that that $(pkglibexecdir) is created
> unconditionally.
>
> [SNIP]
> 
> To summarize: 'nodist_bin_SCRIPTS =' is an extremely convenient way to
> ensure that $(bindir) -- or rather $(DESTDIR)$(bindir) -- exists.
>
I agree, and in fact I regard this as a feature (which automake has been known
to use in its own build system for some time).

But I see (with a simple "grep 'test -d' tests/*" command) that this behaviour
wasn't covered by our testsuite.  I've thus added a new test to ensure we don't
unwittingly break this feature (see attached patch, pushed to maint).

Thanks,
  Stefano
[0001-coverage-an-empty-foo_PRIMARY-should-create-director.patch (text/x-diff, attachment)]

Information forwarded to bug-automake <at> gnu.org:
bug#10997; Package automake. (Mon, 12 Mar 2012 14:15:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#10997; Package automake. (Sat, 17 Mar 2012 08:19:02 GMT) Full text and rfc822 format available.

Message #25 received at 10997 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Peter Breitenlohner <peb <at> mppmu.mpg.de>
Cc: Daiki Ueno <ueno <at> unixuser.org>, bug-automake <at> gnu.org,
	"automake-patches <at> gnu.org" <automake-patches <at> gnu.org>,
	10997 <at> debbugs.gnu.org
Subject: Re: bug#10997: pkglibexecdir is unconditionally created when make
	install
Date: Sat, 17 Mar 2012 08:48:03 +0100
On 03/12/2012 02:43 PM, Stefano Lattarini wrote:
> On 03/12/2012 12:21 PM, Peter Breitenlohner wrote:
>>
>> To summarize: 'nodist_bin_SCRIPTS =' is an extremely convenient way to
>> ensure that $(bindir) -- or rather $(DESTDIR)$(bindir) -- exists.
>>
> I agree, and in fact I regard this as a feature (which automake has been known
> to use in its own build system for some time).
>
I've now changed my mind, and started to consider this behaviour as a bug; see
automake bug#11030:

  <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11030>

A fix to that will obviously fix the present bug as well.

Regards,
  Stefano




Information forwarded to bug-automake <at> gnu.org:
bug#10997; Package automake. (Sat, 17 Mar 2012 08:20:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#10997; Package automake. (Sun, 18 Mar 2012 19:51:01 GMT) Full text and rfc822 format available.

Message #31 received at 10997 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Peter Breitenlohner <peb <at> mppmu.mpg.de>
Cc: Daiki Ueno <ueno <at> unixuser.org>, bug-automake <at> gnu.org,
	"automake-patches <at> gnu.org" <automake-patches <at> gnu.org>,
	10997 <at> debbugs.gnu.org
Subject: Re: bug#10997: pkglibexecdir is unconditionally created when make
	install
Date: Sun, 18 Mar 2012 20:20:19 +0100
tags 10997 + patch
close 10997
thanks

On 03/17/2012 08:48 AM, Stefano Lattarini wrote:
> On 03/12/2012 02:43 PM, Stefano Lattarini wrote:
>> On 03/12/2012 12:21 PM, Peter Breitenlohner wrote:
>>>
>>> To summarize: 'nodist_bin_SCRIPTS =' is an extremely convenient way to
>>> ensure that $(bindir) -- or rather $(DESTDIR)$(bindir) -- exists.
>>>
>> I agree, and in fact I regard this as a feature (which automake has been known
>> to use in its own build system for some time).
>>
> I've now changed my mind, and started to consider this behaviour as a bug; see
> automake bug#11030:
> 
>   <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11030>
> 
> A fix to that will obviously fix the present bug as well.
> 
This bug has now been fixed by the same patch fixing bug#11030.

Regards,
  Stefano




Information forwarded to bug-automake <at> gnu.org:
bug#10997; Package automake. (Sun, 18 Mar 2012 19:52:02 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 18 Mar 2012 19:52:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 10997 <at> debbugs.gnu.org and Daiki Ueno <ueno <at> unixuser.org> Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 18 Mar 2012 19:52:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 16 Apr 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 348 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.