automake-patches
[Top][All Lists]
Advanced

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

Re: install-sh -C


From: Akim Demaille
Subject: Re: install-sh -C
Date: Mon, 23 Oct 2006 07:20:38 +0200

I have some problems with these definitions.  If there are several
files that have the youngest time stamp, then the order depends on
the  locale.

Nia?  How can the locale change the order to time stamps?

Only if the time stamps are the same:

$ touch a B
$ LC_ALL=C ls -1t
B
a
$ ls -1t
a
B
$ locale | grep COLL
LC_COLLATE="de_DE.UTF-8"

I still don't understand how find can make a better job.  Since
it uses the same time stamp its own order might even be non
defined.  So anyway the user of the test itself has to know that
the test should not be used when arguments are too close in time.

Do you know of any means to compute the list of files with *equal*
time stamp?  Hum, playing with repetitive calls to find -not -newer
should do that, but looks expensive.



Anyway, here if there are several "youngest", then something is wrong.
That trick is used in many places, including Automake's tests.

Yes.  And about half the $sleep's in tests/aclocal7.test can be thrown
out if `ls -1t' were not used, but `find -newer'.  I added some in the
2006-05-10 change. The corresponding discussion where this came up was: http://lists.gnu.org/archive/html/automake-patches/2006-09/ msg00026.html

Interresting thread (congratulations Sherlock!), but again, I fail to
see any added value to find compared to ls.  If the result is undefined
because the time stamps are too close (read equal), then I don't care
about determinism.



Yuck.  Stepan suggested `find -newer' as one way out in the case we
ran into this, I think.

I fail to see why it would solve anything: why should find avoid
nondeterminism due to equality of time stamps?

ls sorts equal-time files by locale. `find -newer' can tell you if what
you think is the newest (or oldest) file really is.

I don't understand why.  If find can tell me that, then it means time
stamps can tell, so ls too.

--- tests/install2.test 14 May 2005 20:28:55 -0000 1.14
+++ tests/install2.test 22 Oct 2006 17:09:52 -0000

@@ -21,8 +21,9 @@
 # Test for bug in `make dist'
 # From Pavel Roskin.

+set -e
 required=gzip
-. ./defs || exit 1
+. ./defs

I don't think `defs' is written to be `set -e' clean.  At least all
other tests only enable it after sourcing defs.

Agreed, but what do you suggest: proofreading defs so that it'd
be, or do as in the other tests?  I prefer the former, that's
more factorized.

BTW, I don't know if there is any value in that, but we could
factor even more by changing the scripts' bangshees to using
./defs.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]