Thanks

Iain Patterson wrote:
>   The online documentation for cfengine(2) says that
> AccessedBefore(f1,f2) is true if f1's atime is more recent than f2's
> atime.  It also says that ChangedBefore(f1,f2) is true if f1's ctime is
> more recent than f2's ctime.
> 
>   In fact AccessedBefore(f1,f2) is true if f2's atime is more recent and
> ChangedBefore(f1,f2) is true if f2's ctime is more recent.
> 
>   IsNewerThan(f1,f2) behaves as documented.  It is true if f2's mtime is
> more recent.
> 
>   However I suspect that the documentation for the *Before() functions
> is incorrect and that the functions themselves behave as intended, while
> IsNewerThan() does not behave as intended.  Here's why:
> 
>   The documentation says that IsGreaterThan(s1,s2) is true if s1 > s2
> and that IsLessThan(s1,s2) is true if s1 < s2.  Both these functions
> behave as documented.  AccessedBefore(f1,f2) actually is true if f1 was
> accessed before f2.  ChangedBefore(f1,f2) actually is true if f1 was
> changed before f2.  In each of these cases, the first argument to the
> function fits the description provided by the function's name.
> 
>   For consistency, therefore, the attached patch changes IsNewerThan()
> so that IsNewerThan(f1,f2) is true if f1's mtime is more recent than
> f2's mtime.  It also changes the documentation for all three file
> comparison functions to match the (new) actual behaviour.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Bug-cfengine mailing list
> Bug-cfengine@cfengine.org
> 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
Bug-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/bug-cfengine

Reply via email to