Matt, this is not so much a bug as policy. I agree that a blank line
at the end of the file should probably be truncated. It occurs because
 the line ends with a \n meaning that there is strictly another empty
line before EOF.

I changed the policy in svn so this no longer happens. I think this is
probably most intuitive for people - so fair enough.

M

Matt Richards wrote:
> Greetings,
> 
> I am getting this bug were readstringlist will have an extra blank
> line at the end. I can see why it would do this, but I don't believe
> it should. The example below is reading a file call list:
> 
> # cat ../list
> a
> b
> c
> #
> 
> body common control {
> 
>     bundlesequence      => { "test" };
> }
> 
> bundle agent test {
> 
>   vars:
> 
>     "list" slist => {
> readstringlist("$(sys.workdir)/list","#.*","[\n]",1000,10000) };
> 
>   reports:
>    Yr2009::
>      "list *$(list)*";
> 
> }
> 
> 
> cf3     .........................................................
> cf3     Promise by: list *a*
> cf3     .........................................................
> cf3
> cf3 R: list *a*
> cf3
> cf3     .........................................................
> cf3     Promise by: list *b*
> cf3     .........................................................
> cf3
> cf3 R: list *b*
> cf3
> cf3     .........................................................
> cf3     Promise by: list *c*
> cf3     .........................................................
> cf3
> cf3 R: list *c*
> cf3
> cf3     .........................................................
> cf3     Promise by: list **
> cf3     .........................................................
> cf3
> cf3 R: list **             <======= should this be here?
> cf3
> _______________________________________________
> Bug-cfengine mailing list
> [email protected]
> https://cfengine.org/mailman/listinfo/bug-cfengine

-- 
Mark Burgess

-------------------------------------------------
Professor of Network and System Administration
Oslo University College, Norway

Personal Web: http://www.iu.hio.no/~mark
Office Telf : +47 22453272
-------------------------------------------------
_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine

Reply via email to