-
Type:
Bug
-
Status: Done
-
Priority:
High
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 3.6.0
-
Component/s: Masterfiles Policy Framework (MPF/COPBL/STDLIB)
-
Labels:None
A test file (/tmp/test):
@foo = bar@
promise.cf:
<pre>
body common control
{
bundlesequence =>
;
inputs =>
;
}
bundle agent example
{
vars:
"v[foo]" string => "abc";
files:
"/tmp/test"
edit_line => maintain_key_values("example.v","=");
}
</pre>
output:
<pre>
$ cf-agent -KI
2014-04-02T15:35:44+0200 error: /example/files/'/tmp/test'/maintain_key_values/replace_patterns/'($(keypat[$(index)]))(?!$(ve[$(index)])$).': Promised replacement 'foo = abc' on line 'foo = bar' for pattern '(\s*foo\s=\s*)(?!abc$).*' is not convergent while editing '/tmp/test'
2014-04-02T15:35:44+0200 error: Because the regular expression '^(\s*foo\s*=\s*)(?!abc$).*' still matches the replacement string 'foo = abc'
2014-04-02T15:35:44+0200 error: Promise belongs to bundle 'maintain_key_values' in file '/home/fabien/.cfagent/inputs/libraries/cfengine_stdlib.cf' near line 565
2014-04-02T15:35:44+0200 error: Comment is 'Replace definition of foo'
</pre>
If the length of the value is different or if there is no space between the separator and the value, it works as expected. I don't know how to correct this bug.
Regards,
Fabien Grumelard
- relates to
-
CFE-1318 Edit reports every time, even when no change
-
- Done
-