[GHC] #7879: validate in build tree fails due to problem copying haddock resources to inplace
GHC
cvs-ghc at haskell.org
Thu May 2 16:44:16 CEST 2013
#7879: validate in build tree fails due to problem copying haddock resources to
inplace
-----------------------------+----------------------------------------------
Reporter: AndreasVoellmy | Owner:
Type: bug | Status: new
Priority: normal | Component: Build System
Version: | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: Other | Blockedby:
Blocking: | Related:
-----------------------------+----------------------------------------------
Comment(by AndreasVoellmy):
I think the problem is that the utils/haddock/resources/html directory is
copied over to inplace using "cp -R". I verified that using cp -R plays
badly with relative links:
First make a couple directories and a file:
$ mkdir src; cd src; mkdir dir1; cd dir1; mkdir dir2; cd dir2; echo hello
> foo.txt; cd ../../..
$ ls
src
Now make a target directory whose contents created using lndir with
relative path; make sure everything is OK:
$ mkdir tgt; cd tgt; lndir ../src; cd ..
../src/dir1:
../../src/dir1/dir2:
$ ls
src tgt
$ ls -l tgt/dir1/dir2
total 8
lrwxr-xr-x 1 andreas staff 30 May 2 09:15 foo.txt ->
../../../src/dir1/dir2/foo.txt
$ cat tgt/dir1/dir2/foo.txt
hello
Now cp -R dir2 up a level in the target; now the file is broken:
$ cd tgt
$ cp -R dir1/dir2 .
$ ls
dir1 dir2
$ ls -l dir2
total 8
lrwxr-xr-x 1 andreas staff 30 May 2 09:16 foo.txt ->
../../../src/dir1/dir2/foo.txt
$ cat dir2/foo.txt
cat: dir2/foo.txt: No such file or directory
If we use cp -RL things are OK:
$ rm -rf dir2
$ cp -RL dir1/dir2 .
$ ls -l dir2
total 8
-rw-r--r-- 1 andreas staff 6 May 2 09:22 foo.txt
$ cat dir2/foo.txt
hello
cp -R is indeed being used on lines 23 and 27 of utils/haddock/ghc.mk.
Changing to cp -RL fixes the problem.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7879#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list