Date: Tue, 27 Aug 2002 14:44:02 +0700 (NOVST) From: Nickolay Dudorov <nnd@mail.nsk.ru> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/42060: "make search ..." may not work due to symlinks Message-ID: <200208270744.g7R7i2nx003126@nnd.itfs.nsk.su>
next in thread | raw e-mail | index | archive | help
>Number: 42060 >Category: ports >Synopsis: "make search ..." may not work due to symlinks >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Aug 27 00:50:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Nickolay Dudorov >Release: FreeBSD 5.0-CURRENT i386 >Organization: NTP Infoteka >Environment: System: FreeBSD nnd.itfs.nsk.su 5.0-CURRENT FreeBSD 5.0-CURRENT #35: Tue Aug 27 08:46:54 NOVST 2002 nnd@nnd.itfs.nsk.su:/arch/obj/usr/src/sys/NND i386 >Description: If PORTSDIR on your CURRENT system contains symlinks then "make search ..." command may not work as intended, i.e. not find any ports. >How-To-Repeat: Let's assume that on your system /usr/ports is a symlink to the /a/ports (for example). In this case following commands (in csh) give no results: cd /a/ports/shells make search key=bash >Fix: The problem is in the 'pwd' builtin command of the /bin/sh which (by default) prints "Logical" working directory while /bin/pwd and /bin/csh builtin pwd prints "Phisical" working directory by default. The next patch make it possible to "make search" in the ports hierarchy depite the symlinks in the PORTSDIR. Index: bsd.port.subdir.mk =================================================================== RCS file: /home/CVS/ports/Mk/bsd.port.subdir.mk,v retrieving revision 1.43 diff -b -u -r1.43 bsd.port.subdir.mk --- bsd.port.subdir.mk 5 Jul 2002 09:14:53 -0000 1.43 +++ bsd.port.subdir.mk 27 Aug 2002 07:16:39 -0000 @@ -252,7 +252,7 @@ search: ${PORTSDIR}/INDEX @here=`pwd`; \ cd ${PORTSDIR}; \ - top=`pwd`; \ + top=`pwd -P`; \ there=`echo "$$here/" | sed s%$$top%${PORTSDIR}%`; \ if [ -n "$$key" ]; then \ grep $$there ${PORTSDIR}/INDEX | grep -i "${key}" | awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nB-deps:\t%s\nR-deps:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9); }'; \ >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208270744.g7R7i2nx003126>