Re: Option autoconf option --debug no longer working

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

 



I meant

 $cache = $tmp
   unless defined $cache and len $cache;

of course. Sorry for the confusion.

Regards, Thomas

> On Sep 4, 2023, at 17:26 , Thomas Jahns <jahns@xxxxxxx> wrote:
> 
> Also, may I question the decision to use
> 
>  $cache = $tmp
>    unless $cache;
> 
> which results in falsy values for $cache like '0' to be ignored while '0000' works as expected?
> 
> My recommendation would be to use
> 
>  $cache = $tmp
>    unless defined $cache and -n $cache;
> 
> instead.
> 
> Kind regards, Thomas
> 
>> On Sep 4, 2023, at 15:23 , Thomas Jahns <jahns@xxxxxxx> wrote:
>> 
>> Of course there was a dependency. But I think I managed to find a suitable change that again preserves the temporaries. Please see the attached patch vs. cb6fbab55de1e9660e110857ae248a70a8b48c5b and tell me if that needs further improvements or is acceptable as is.
>> 
>> Kind regards, Thomas
>> 
>> 
>> 
>>> On Sep 4, 2023, at 14:57 , Thomas Jahns <jahns@xxxxxxx> wrote:
>>> 
>>> Following up on this, I think this is because autom4te calls mktmpdir before parsing command line arguments:
>>> 
>>> ## -------------- ##
>>> ## Main program.  ##
>>> ## -------------- ##
>>> 
>>> mktmpdir ('am4t');
>>> load_configuration ($ENV{'AUTOM4TE_CFG'} || "$pkgdatadir/autom4te.cfg");
>>> load_configuration ("$ENV{'HOME'}/.autom4te.cfg")
>>> if exists $ENV{'HOME'} && -f "$ENV{'HOME'}/.autom4te.cfg";
>>> load_configuration (".autom4te.cfg")
>>> if -f ".autom4te.cfg";
>>> parse_args;
>>> 
>>> In this order it creates the am4t... directory with the UNLINK option always being 1, i.e. !$debug while previously Autom4te::General had a custom END block that deleted the temporary files conditionally and hence used the value of $debug set by Autom4te::General::getopt.
>>> 
>>> I'm not sure if load_configuration somehow needs the temporary directory or if parse_args could be moved to precede all of the main program. I'll try that next but wanted to keep you informed of my ongoing investigation.
>>> 
>>> Kind regards, Thomas
>>> 
>>> 
>>> 
>>>> On Sep 4, 2023, at 13:15 , Thomas Jahns <jahns@xxxxxxx <mailto:jahns@xxxxxxx>> wrote:
>>>> 
>>>> Dear autoconf maintainers,
>>>> 
>>>> when trying to port another piece of software to use autoconf 2.71 I noticed a problem I wanted to debug with the autoreconf --debug option. But it seems autoconf now deletes the temporary files in all paths.
>>>> 
>>>> While the 2.69 version I'm currently using preserves files in /tmp, when swapping the PATH to use autoconf 2.71, autoconf always unlinks the files there (and removes the temporary directory) as verified with strace -f -e rmdir,unlink on Linux x86_64.
>>>> 
>>>> I tried
>>>> 
>>>> autoconf --debug --verbose
>>>> 
>>>> in a minimal autoconf directory like this:
>>>> 
>>>> $ autoconf --debug --verbose 2>&1 | grep /tmp
>>>> autom4te: formatting traces for `/tmp/am4tYtdOcp/dependencies': include, m4_include
>>>> autom4te: formatting traces for `/tmp/am4tYtdOcp/warnings': _m4_warn
>>>> autom4te: reading /tmp/am4tYtdOcp/warnings
>>>> $ ls /tmp/am4tYtdOcp
>>>> dependencies  traces.m4  warnings
>>>> $ module load autoconf-2.71-gcc-6.3.0-rj5ute2
>>>> $ autoconf --debug --verbose 2>&1 | grep /tmp
>>>> autom4te: formatting traces for '/tmp/am4toeE5oa/warnings': _m4_warn
>>>> autom4te: reading /tmp/am4toeE5oa/warnings
>>>> autom4te: formatting traces for '/tmp/am4toeE5oa/patterns': m4_pattern_allow, m4_pattern_forbid
>>>> $ ls /tmp/am4toeE5oa/
>>>> ls: cannot access '/tmp/am4toeE5oa/': No such file or directory
>>>> $ cat configure.ac
>>>> AC_INIT([hello], [1.0])
>>>> AC_CONFIG_AUX_DIR([build-aux])
>>>> AC_OUTPUT
>>>> $  strace -f -e rmdir,unlink autoconf --debug --verbose 2>&1 | grep -E 'unlink|rmdir|/tmp'
>>>> autom4te: formatting traces for '/tmp/am4tciBmIE/dependencies': include, m4_include
>>>> autom4te: formatting traces for '/tmp/am4tciBmIE/warnings': _m4_warn
>>>> autom4te: reading /tmp/am4tciBmIE/warnings
>>>> unlink("traces.m4")                     = 0
>>>> unlink("dependencies")                  = 0
>>>> unlink("warnings")                      = 0
>>>> rmdir("/tmp/am4tciBmIE")                = 0
>>>> $  ls /tmp/am4tciBmIE
>>>> ls: cannot access '/tmp/am4tciBmIE': No such file or directory
>>>> 
>>>> Kind regards,
>>>> Thomas




Attachment: smime.p7s
Description: S/MIME cryptographic signature


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux