Subject: Re: Problems with symlinks and nfs with 1.0
To: None <current-users@netbsd.org>
From: Andrew Cagney <cagney@highland.com.au>
List: current-users
Date: 11/28/1994 12:00:54
Excerpts from mail: 25-Nov-94 Problems with symlinks and ..
jmc@telecom.ksu.edu (874*)

> Then, I build a link tree of the source in /usr/src/obj and then
> linked the Makefile and top level source dirs back into /usr/src.

> cd'ing into /usr/src/include and doing a make install will hang when it
> trys to run the pax command. The find subcommand never gets run, and it
> just sits there sleeping.

It didn't hang, it's just waiting for input ...

> Any ideas?

 I recently posted a patch to tech-ports about this (but it contained a
bug).  The patch below is my second attempt.

A find is looking for files and *not* soft links.  I can think of two
ways of addressing this:

	1.	Add -h so that it follows links
or	2.	Add -o -type l -name '*.h' so it accepts links to .h files (that
is an el not a one :-)

My patch, using the first method is below.  Notice that the
	-name SRC -prune -o ... (etc)
is to stop the find running into the source tree when things are set up as:
	SRC -> /usr/src
	include/SRC -> ../SRC/include
	include/Makefile -> SRC/Makefile

					enjoy, Andrew


*** 1.1	1994/11/22 09:11:31
--- 1.3	1994/11/27 23:22:32
***************
*** 70,77 ****
  	done
  	cd ../sys; \
  	pax -rw -pa -L \
! 	    `find ${LDIRS} -type f -name '*.h' '!' -path 'netiso/xebec/*' \
! 	    -print` ${DESTDIR}/usr/include
  	rm -rf ${DESTDIR}/usr/include/machine
  	install -d -o bin -g bin -m 755 ${DESTDIR}/usr/include/machine
  	pax -rw -pa -s "|../sys/arch/${MACHINE}/include||" \
--- 70,83 ----
  	done
  	cd ../sys; \
  	pax -rw -pa -L \
! 	    `find -h ${LDIRS} \
! 		-name CVS -prune -o \
! 		-name RCS -prune -o \
! 		-name SRC -prune -o \
! 		-type f \
! 		-name '*.h' \
! 		'!' -path 'netiso/xebec/*' \
! 	    	-print` ${DESTDIR}/usr/include
  	rm -rf ${DESTDIR}/usr/include/machine
  	install -d -o bin -g bin -m 755 ${DESTDIR}/usr/include/machine
  	pax -rw -pa -s "|../sys/arch/${MACHINE}/include||" \