Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Mar 2017 22:10:09 +0200 (CEST)
From:      Gerald Pfeifer <gerald@pfeifer.com>
To:        Alexey Dokuchaev <danfe@FreeBSD.org>
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:  <alpine.LNX.2.21.1703262205260.7630@anthias.pfeifer.com>
In-Reply-To: <20170221115235.GA44022@FreeBSD.org>
References:  <201511241019.tAOAJMTF049917@repo.freebsd.org> <20151124110152.GA78748@FreeBSD.org> <alpine.LSU.2.20.1702191430520.2410@anthias.pfeifer.com> <20170221115235.GA44022@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 21 Feb 2017, Alexey Dokuchaev 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.

Fair enough.  I went ahead and finally made this change.

> 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.)

Personally I prefer portable code (which sh(1) loops in Makefile
are as opposed to bmake loops), but since you care about this and
this port's Makefile is unlikely to be used on a non-BSD system,
I followed your recommendation.

>> 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?

So, this is a false alert.  Some earlier version of my change had
a bug where the symlinks where created in the current directory
(i.e., $PORTS/lang/gcc) and portlint rightfully warned about that.

Gerald



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.LNX.2.21.1703262205260.7630>