From owner-svn-ports-head@freebsd.org Tue Feb 21 11:52:36 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00AFACE7DE4; Tue, 21 Feb 2017 11:52:36 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D4BFE7B6; Tue, 21 Feb 2017 11:52:35 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 2FBCC31A1; Tue, 21 Feb 2017 11:52:35 +0000 (UTC) Date: Tue, 21 Feb 2017 11:52:35 +0000 From: Alexey Dokuchaev To: Gerald Pfeifer Cc: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: Re: svn commit: r402352 - head/lang/gcc Message-ID: <20170221115235.GA44022@FreeBSD.org> References: <201511241019.tAOAJMTF049917@repo.freebsd.org> <20151124110152.GA78748@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="5vNYLRcllDrimb99" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2017 11:52:36 -0000 --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Feb 19, 2017 at 05:06:45PM +0100, Gerald Pfeifer wrote: > > Symlinks are badly created (will be broken if e.g. $prefix mounted under > > non-/ via NFS), better (untested) approach would be: > > > > .for f in gfortran g++ gcc > > ${LN} -sf ${f}${SUFFIX} ${STAGEDIR}${PREFIX}/bin/${f} > > .endfor > > At first I wasn't completely clear what you had in mind here (or > rather: why exactly), and I did not get a single report from a > user in the 15 months since then. Probably because most people don't care exactly how symlinks point to their targets as long as it works (and it does, most of the time). Usually it's better to use relative paths though, and just the filename when both source and target are in the same directory. > What do you think about the patch below? I still think that it's better to use make(1)'s .for loop rather than sh(1)'s one. Consider attached patch which also fixes indentation of the comment. (You might also want to call ln(1) with `-f' switch at your discretion.) > Only problem is, portlint now warns > > WARN: g++: this is a symlink. Please remove it. > WARN: gcc: this is a symlink. Please remove it. > WARN: gfortran: this is a symlink. Please remove it. > > which I did not do when I've been using absolute paths. Hmm, I cannot reproduce this. Can you report portlint version (portlint -V) and attach the output of `portlint -Avc .' please? These messages should normally be emitted when checking port's directory; are there anything not belonging to it by chance? ./danfe --5vNYLRcllDrimb99 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="gcc.diff" Index: Makefile =================================================================== --- Makefile (revision 434441) +++ Makefile (working copy) @@ -161,10 +161,10 @@ fi .endfor cd ${WRKDIR} ; ${SED} -i -e "/PLIST.lib/ r PLIST.lib" ${TMPPLIST} - # This is the canonical GCC port, so add key commands without - # version numbers as part of their names. - for c in gfortran g++ gcc; do \ - ${LN} -s ${PREFIX}/bin/"$$c"${SUFFIX} ${STAGEDIR}${PREFIX}/bin/$$c ; \ - done +# This is the canonical GCC port, so add key commands without version +# numbers as part of their names. +.for prog in gfortran g++ gcc + ${LN} -s ${prog}${SUFFIX} ${STAGEDIR}${PREFIX}/bin/${prog} +.endfor .include --5vNYLRcllDrimb99--