On Wed, Oct 30, 2019 at 23:12:15 +0100, Heiko Schlittermann wrote:
> If I have it in "foo" only, it is only there and does not propagate.
> If I have it in "foo-foo" only, it is only there and does not propagate.
> If I have it in "foo-foo-foo" only, it is only there and does not propagate.
> 
> If I have it in "foo" and "foo-foo", it is twice in "foo-foo" (one
> propagated from "foo"), but doesn't propagate further.
> 
> And so on.

Are you sure?  I ran some tests using a config file based on your
example (using Amanda 3.5.1 built from the Debian package, though on a
Ubuntu Bionic box), and the results are below (feeding the output of
"amadmin ... .config" through an "awk" script to print out just the
SCRIPT lines from within the foo* dumptype definitions).  In these
tests, it appears that the simple "script pre-dle" value propages down
one level (but not down two as expected):

===============
# tail -13 $CONF; echo "====="; su backup -c "amadmin TestBackup config" | awk 
-e 'BEGIN {in_def=0; }; /foo/ {in_def=1; print $0}; /}/ {in_def=0}; /SCRIPT/ 
{if (in_def==1) print $0;}'
define dumptype foo {
script pre-dle   
}

define dumptype foo-foo {
foo
#script pre-dle  
}

define dumptype foo-foo-foo {
foo-foo
#script pre-dle  
}
=====
DEFINE DUMPTYPE foo {
      SCRIPT              pre-dle
DEFINE DUMPTYPE foo-foo {
      SCRIPT              pre-dle
DEFINE DUMPTYPE foo-foo-foo {
      SCRIPT

===============

(I'm just curious because I agree the problem is somewhere in conffile.c
but want to be sure the behavior I am looing for in the code is what you
are actually hitting, too.)

                                                        Nathan

----------------------------------------------------------------------------
Nathan Stratton Treadway  -  [email protected]  -  Mid-Atlantic region
Ray Ontko & Co.  -  Software consulting services  -   http://www.ontko.com/
 GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt   ID: 1023D/ECFB6239
 Key fingerprint = 6AD8 485E 20B9 5C71 231C  0C32 15F3 ADCD ECFB 6239

Reply via email to