[commit: ghc] master: Check if file is present instead of directory (7012ed8)

git at git.haskell.org git at git.haskell.org
Tue Aug 19 12:10:05 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/7012ed8515100b4947383e93b82dbff7a0aa835c/ghc

>---------------------------------------------------------------

commit 7012ed8515100b4947383e93b82dbff7a0aa835c
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Sat Jun 21 01:57:53 2014 +0200

    Check if file is present instead of directory
    
    Fixes #8886.
    
    Problem: any `sync-all` command that is run before the first succesfull
    `sync-all get` would trigger a false warning about an old `time` package
    being present.
    
    Cause: after cloning the ghc repository, the (empty) `libraries/time`
    directory is already present.
    
    Solution: check if the directory actually contains any of the `time`
    files. I picked the `LICENSE` file, since `boot` does so as well.
    
    Signed-off-by: Austin Seipp <austin at well-typed.com>


>---------------------------------------------------------------

7012ed8515100b4947383e93b82dbff7a0aa835c
 sync-all | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sync-all b/sync-all
index 355e16a..651a4f0 100755
--- a/sync-all
+++ b/sync-all
@@ -964,7 +964,7 @@ EOF
         }
     }
     message "== Checking for old time from tarball";
-    if (-d "libraries/time" and ! -e "libraries/time/.git") {
+    if (-f "libraries/time/LICENSE" and ! -e "libraries/time/.git") {
             print <<EOF;
 ============================
 ATTENTION!



More information about the ghc-commits mailing list