Subject: Incorrect symlink in WRKOBJDIR
To: None <tech-pkg@netbsd.org>
From: Xavier HUMBERT <xavier@xavhome.fr.eu.org>
List: tech-pkg
Date: 09/22/2001 22:41:01
I noticed a strange behaviour while using WRKOBJDIRs in the packages
tree : 

The shell considers that work.{$arch} is a symlink to a file, rather than
to a directory. Hence, misc errors, like ../../patches/patche-nn being not
found from build dir under certain conditions, name completion failing or
FTP clients not being able to CWD to work.{$arch}

The following patches fixes that (a missing / at the end of the target of
the symlink) in do-extract target :


--- bsd.pkg.mk  Sat Sep 22 22:26:48 2001
+++ bsd.pkg.mk.orig   Sat Sep 15 13:42:15 2001
@@ -1326,7 +1326,7 @@
 .  ifdef WRKOBJDIR
        ${_PKG_SILENT}${_PKG_DEBUG}                                     \
        ${RM} -f ${WRKDIR_BASENAME} || ${TRUE};                         \
-       if ${LN} -s ${WRKDIR}/ ${WRKDIR_BASENAME} 2>/dev/null; then     \
+       if ${LN} -s ${WRKDIR} ${WRKDIR_BASENAME} 2>/dev/null; then      \
                ${ECHO} "${WRKDIR_BASENAME} -> ${WRKDIR}";              \
        fi
 .  endif # WRKOBJDIR

Xav

-- 
Xavier HUMBERT  -  Systemes et Reseaux     |     labo-info@injep.fr
INJEP                                      |     humbert@injep.fr