On Sat, 23 Jun 2012 19:34:36 +0200 (CEST) davidlee wrote: 

n> As it was, the "$(key)_in_file" was OK for a single call, but could fail 
when called on different files with the same key.

n> The revised version "$(key)_in_$(file)" allows multiple calls for the same 
key on different files; it adds file-based uniqueness.
...
n> I think you'll agree that this attempt at fudging global uniqueness is 
getting messy, and may still be prone to yet other non-uniqueness circumstances.

n> The only clean solution is to use something of truly local, not global, 
scope.  But is there such a thing available to us?

In Design Center, cf-sketch feeds the bundles a unique prefix for every
activation, which lets you create a "canonical prefix" for each
top-level bundle call.  grep for "canon_prefix", you'll see it.

It doesn't solve the problem either (a leaf bundle can be invoked
multiple times), and I would like a "classes_local" body that acts
exacly like "classes" but the context it sets is local to the bundle
invocation.  This is the case for contexts created by other means in a
bundle, so it should be possible.

Ted
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to