svn commit: r402352 - head/lang/gcc

Gerald Pfeifer gerald at pfeifer.com
Sun Mar 26 20:10:21 UTC 2017


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


More information about the svn-ports-head mailing list