On 07/31/2012 10:18 AM, Tokarski Boleslaw wrote: > Normal ordering specifies that vars are run before classes. So before > anything else happens below this, debug is not declared, so "filename" > is set to "/tmp/nodebug". > > Then, the class debug is declared, on the second CFEngine iteration this > should point that "filename" var is to be redefined to "/tmp/debug". > However, the default "vars" policy is "constant", as per: > https://cfengine.com/manuals/cf3-Reference#policy-in-vars > so it cannot be redefined, but it is supposed to, thus the warning about > re-declaration.
Sure, I understand the warnings about redeclaration. The thing is, /tmp/debug is created on the first pass of files, when $(filename) should be set to /tmp/nodebug because the debug class is not defined. cf3> ========================================================= cf3> classes in bundle test (1) cf3> ========================================================= cf3> cf3> ?> defining explicit local bundle class debug cf3> Initiate variable convergence... cf3> !! Duplicate selection of value for variable "filename" in scope test cf3> !! Rule from ./test_variable_convergance.cf at/before line 20 cf3> cf3> + Private classes augmented: cf3> + debug cf3> cf3> - Private classes diminished: cf3> cf3> cf3> cf3> ========================================================= cf3> files in bundle test (1) cf3> ========================================================= cf3> cf3> cf3> ......................................................... cf3> Promise's handle: cf3> Promise made by: "/tmp/debug" cf3> ......................................................... cf3> cf3> -> Using literal pathtype for /tmp/debug cf3> -> No mode was set, choose plain file default 600 cf3> -> Created file /tmp/debug, mode = 600 cf3> ?> defining promise result class repaired__tmp_debug cf3> -> Handling file existence constraints on /tmp/debug _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine