Date: Sun, 22 Jan 2012 23:11:10 +0100 From: Olli Hauer <ohauer@FreeBSD.org> To: Alexey Dokuchaev <danfe@freebsd.org> Cc: cvs-ports@freebsd.org, Eitan Adler <eadler@freebsd.org>, cvs-all@freebsd.org Subject: Re: cvs commit: ports/multimedia/acidrip Makefile ports/math/algotutor Makefile ports/sysutils/apt Makefile ports/graphics/asciio Makefile ports/devel/autodia Makefile ports/www/awffull Makefile ports/devel/bazaar Makefile ports/www/bigbluebutton Mak Message-ID: <4F1C897E.1050805@FreeBSD.org> In-Reply-To: <CAF6rxg=Wnh90=Nr0iuaz_HjWfenavuq1FqAHJ6Q3KpQs4sUrHA@mail.gmail.com> References: <CAF6rxg=Wnh90=Nr0iuaz_HjWfenavuq1FqAHJ6Q3KpQs4sUrHA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2012-01-22 17:00, Eitan Adler wrote: > 2012/1/22 Alexey Dokuchaev <danfe@freebsd.org>: >> On Sat, Jan 21, 2012 at 05:40:15PM +0000, Eitan Adler wrote: >>> eadler 2012-01-21 17:40:15 UTC >>> >>> Log: >>> At the moment 1385 ports use BUILD_DEPENDS= ${RUN_DEPENDS} and 450 >>> ports use BUILD_DEPENDS:= ${RUN_DEPENDS}. This patch fixes ports that are >>> currently broken. This is a temporary measure until we organically stop >>> using := or someone(s) spend a lot of time changing all the ports over. >> >> Thanks for using correct way of assigning rdeps to bdeps. Can you elaborate >> on the last sentence of the log? Why should we stop using :=? Hm, if I read the diffs Eitan has changed from `=' to `:=' so I think you mean Why should we stop using `='? >> Instead, we should fix portlint(1) to offer this obvious thing instead of >> duplicating two variables like it bogusly does now. > > The concern is that someone would add something extra to BUILD_DEPENDS > without thinking about it and thus add extra bogus RUN_DEPENDS. I'm > uncertain if there other additional reasons that portmgr dislikes := It doesn't matter if you have RUN_DEPENDS=${BUILD_DEPENDS} or RUN_DEPENDS:=${BUILD_DEPENDS}, if someone adds additional `something' to BUILD_DEPENDS then it is in both cases also in RUN_DEPENDS but `:=` preserves including additional dependencies from `something'. If I see RUN_DEPENDS=${BUILD_DEPENDS} the first I do is a cross check with `make -V RUN_DEPENDS' and a second check if I change to `:=' Most every time the usage of `:=' stops double including perl and others to the RUN_DEPENDS list and I change then to `:='. Maybe the following section in the PH will make things clearer. http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-depend.html#AEN2173 Quote: A quite common situation is when RUN_DEPENDS is literally the same as BUILD_DEPENDS, especially if ported software is written in a scripted language or if it requires the same build and run-time environment. In this case, it is both tempting and intuitive to directly assign one to the other: RUN_DEPENDS= ${BUILD_DEPENDS} However, such assignment can pollute run-time dependencies with entries not defined in the port's original BUILD_DEPENDS. This happens because of make(1)'s lazy evaluation of variable assignment. Consider a Makefile with USE_* variables, which are processed by ports/Mk/bsd.*.mk to augment initial build dependencies. For example, USE_GMAKE=yes adds devel/gmake to BUILD_DEPENDS. To prevent such additional dependencies from polluting RUN_DEPENDS, take care to assign with expansion, i.e., expand the value before assigning it to the variable: RUN_DEPENDS:= ${BUILD_DEPENDS}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F1C897E.1050805>