On Fri, Mar 23, 2012 at 8:31 AM, Jan Stary <[email protected]> wrote: > On Mar 23 07:11:45, RD Thrush wrote: >> My PORTSDIR is on an nfs server. Mounting the particular nfs >> directory on /usr/ports (and setting PORTSDIR accordingly) fails the >> new test in bsd.port.mk. > > Can you please show how exactly you are mounting it, > and how exactly it fails? > > If you 'mount server:/some/dir /usr/ports', > then you shouldn't need to set PORTSDIR at all, > (because it's the default /usr/ports, right?). > > Is possibly /usr/ports a symlink itself on your machine > (the NFS client)? > >> Apparently test -h considers an nfs mount the same as a symlink... > > No it doesn't; 'test -h foo' only evaluates as true for symlinks. > >> - @if test -h ${PORTSDIR}; then \ >> - echo 1>&2 "Fatal: ${PORTSDIR} is a symlink. Please set to the >> real directory"; \ >> + @if ! test -d ${PORTSDIR}; then \ >> + echo 1>&2 "Fatal: ${PORTSDIR} is a not a directory."; \ > > This doesn't help, because > > Symbolic links are followed for all primaries except -h and -L. > > So even if PORTSDIR was a symlink to a directory, "test -d" > would follow the symlink and evaluates as true; which is a bad thing. > > Lokking at the manpag an source of test(1),
you are looking at the wrong reference. in the context of those makefiles, test will be the ksh builtin, not the binary i haven't checked if the builtin is implemented the same, but still
