[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[augeas-devel] Re: [Augeas] #64: [group.aug] fails when file has no trailing eol



#64: [group.aug] fails when file has no trailing eol
----------------------+-----------------------------------------------------
  Reporter:  raboof   |       Owner:  lutter
      Type:  defect   |      Status:  closed
  Priority:  major    |   Milestone:  next  
 Component:  Augeas   |     Version:  devel 
Resolution:  invalid  |    Keywords:        
----------------------+-----------------------------------------------------
Changes (by lutter):

  * status:  new => closed
  * resolution:  => invalid

Comment:

 There's a slight difference between how tests and reading files behave wrt
 trailing newlines: for tests, the provided string is used without
 alteration, on the assumption that the test writer knows best what exact
 string they need. When reading files though, Augeas takes into account
 that many real world files miss the trailing newline, and silently adds
 it.

 I just used an /etc/group without a trailing newline in augtool, and it
 gets processed properly.

 I am closing this ticket as 'invalid' - if you encounter any trouble with
 this behavior, feel free to reopen.

 BTW, the error message "optional expression matches the empty tree but
 does not consume a value" tries to say the following: the newline? lens
 does not produce any tree nodes, i.e. 'matches the empty tree', nor does
 it set the value of a tree node - in that situation, Augeas wouldn't know
 when it goes from a new tree -> file whether it should assume that newline
 is there or not; in this example, it's unclear to Augeas what the default
 for 'newline?' should be - a newline or no newline.

-- 
Ticket URL: <https://fedorahosted.org/augeas/ticket/64#comment:2>
Augeas <http://augeas.net/>
a configuration API



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]