From owner-svn-ports-head@freebsd.org Sun Mar 26 20:10:20 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 E3FC1D1EC45; Sun, 26 Mar 2017 20:10:20 +0000 (UTC) (envelope-from gerald@pfeifer.com) Received: from ainaz.pair.com (ainaz.pair.com [209.68.2.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4B961DD3; Sun, 26 Mar 2017 20:10:20 +0000 (UTC) (envelope-from gerald@pfeifer.com) Received: from anthias (vie-188-118-241-134.dsl.sil.at [188.118.241.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ainaz.pair.com (Postfix) with ESMTPSA id 772D53F530; Sun, 26 Mar 2017 16:10:17 -0400 (EDT) Date: Sun, 26 Mar 2017 22:10:09 +0200 (CEST) From: Gerald Pfeifer To: Alexey Dokuchaev cc: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: Re: svn commit: r402352 - head/lang/gcc In-Reply-To: <20170221115235.GA44022@FreeBSD.org> Message-ID: References: <201511241019.tAOAJMTF049917@repo.freebsd.org> <20151124110152.GA78748@FreeBSD.org> <20170221115235.GA44022@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; CHARSET=US-ASCII Content-Disposition: INLINE 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: Sun, 26 Mar 2017 20:10:21 -0000 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