Date: Tue, 21 Feb 2017 11:52:35 +0000 From: Alexey Dokuchaev <danfe@FreeBSD.org> To: Gerald Pfeifer <gerald@pfeifer.com> 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> In-Reply-To: <alpine.LSU.2.20.1702191430520.2410@anthias.pfeifer.com> References: <201511241019.tAOAJMTF049917@repo.freebsd.org> <20151124110152.GA78748@FreeBSD.org> <alpine.LSU.2.20.1702191430520.2410@anthias.pfeifer.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <bsd.port.post.mk> --5vNYLRcllDrimb99--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170221115235.GA44022>