automake-patches
[Top][All Lists]
Advanced

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

Re: install-sh -C


From: Ralf Wildenhues
Subject: Re: install-sh -C
Date: Sun, 22 Oct 2006 21:14:31 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

* Akim Demaille wrote on Sun, Oct 22, 2006 at 07:10:20PM CEST:
> 
> >
> >>+      then
> >>+   # No need to copy, that's the same file.
> >>+   continue
> >>+      else :; fi } &&
> >
> >There has to be a semicolon before the }, I think.
> 
> I don't you do: I think the semi-colon is required to end the command
> just as you would after a "test" before the "then".  But here, it's
> a shell syntactic construct, not an "open" command.

Ah, ok.  I didn't know there was a difference.  Thanks!

> Anyway, I don't think it can harm, so I added it.

> >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"

> 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

> >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.

> >Otherwise there need to be even more "$sleep"s in the test suite over
> >the time, and they already slow it down noticeably.
> 
> Really?  Where should I add some?

Oh, I didn't mean to imply your specific test.  But already some tests
have needed updates exposed by faster machines.

> --- 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.

Cheers,
Ralf




reply via email to

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