Date: Wed, 22 Mar 2017 20:16:09 +0100 From: Mathieu Arnold <mat@FreeBSD.org> To: =?UTF-8?Q?Jev_Bj=c3=b6rsell?= <jev@ecadlabs.com>, "freebsd-ports@freebsd.org" <freebsd-ports@freebsd.org> Subject: Re: question about use of != assignments Message-ID: <745e3da8-3083-a135-ad5d-d60d5de41dc1@FreeBSD.org> In-Reply-To: <CAGKJJVnvVvjhpa0h1LexgKy806NrkMznVQS0b4%2ByB87nefsxjQ@mail.gmail.com> References: <CAGKJJVnvVvjhpa0h1LexgKy806NrkMznVQS0b4%2ByB87nefsxjQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --cP7UnHfFbnO8KeO6I8TuUPPtGogAbEUl3 Content-Type: multipart/mixed; boundary="s3KS7GuSM32S4EJENVmUpUcoC44KsLjXp"; protected-headers="v1" From: Mathieu Arnold <mat@FreeBSD.org> To: =?UTF-8?Q?Jev_Bj=c3=b6rsell?= <jev@ecadlabs.com>, "freebsd-ports@freebsd.org" <freebsd-ports@freebsd.org> Message-ID: <745e3da8-3083-a135-ad5d-d60d5de41dc1@FreeBSD.org> Subject: Re: question about use of != assignments References: <CAGKJJVnvVvjhpa0h1LexgKy806NrkMznVQS0b4+yB87nefsxjQ@mail.gmail.com> In-Reply-To: <CAGKJJVnvVvjhpa0h1LexgKy806NrkMznVQS0b4+yB87nefsxjQ@mail.gmail.com> --s3KS7GuSM32S4EJENVmUpUcoC44KsLjXp Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Le 22/03/2017 =C3=A0 17:57, Jev Bj=C3=B6rsell a =C3=A9crit : > Hello, > > I'm updating net-mgmt/prometheus for which I am the maintainer. > > During build, I have added some ldflags for the `go build` step, so tha= t > build time, version, etc. is recorded in the binary. Before this change= > running `prometheus -version` gives a bunch of blank values, my attache= d > patch fixes that. > > I'm using !=3D assignments in my Makefile to get date, user, and host. > portlint warns me[0] not to use !=3D assignments, and the linked post > suggests to use echo $$(${VARIABLE_CMDS}) instead. > TL;DR: do not do that. If you really need to put versions in the upstream software, put what is available in the Makefile, mainly, PORTVERSION, and if needed PORTREVISION. First, because using !=3D means that every time the Makefile is evaluated= , it needs to fork to get the values, it slow things down considerably when build the whole ports tree. Second, because we need port builds to be reproducible, it means that if I build the port today, and you build it tomorrow, it will end up giving the same package. If you add such customization today, they will be removed very soon when we go over the whole tree again. --=20 Mathieu Arnold --s3KS7GuSM32S4EJENVmUpUcoC44KsLjXp-- --cP7UnHfFbnO8KeO6I8TuUPPtGogAbEUl3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJY0s16XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzQUI2OTc4OUQyRUQxMjEwNjQ0MEJBNUIz QTQ1MTZGMzUxODNDRTQ4AAoJEDpFFvNRg85IjqMQAKqZm/8zNEzF0I4oewMRHea6 uwTsr5hhal+m938+JpXhhO8a15+X3tQFziPpdyJjMdYHLuR00kY8kONZzlWrjJiI 2gmH8pAK7EebCBAPtWP5joe33jQ7FcUS8XmbW494T6XNdInzk65B/snNrGcyU3sl OyrHNlT4hK1iV4cGUFop1hcHZTmp1+80UheT/07YMqrX6jwKYj9nQnf3RzA7dSDR u2cQGqb+p5ptJgEz5nCB1heYhZ+6hTlrWQAandupFSq2BeFlZHmXo1zCVO5HLplv KXmR/LWM+gxZeEtMfFVORbxVoTLFN0BoUm6poETeQqLHAOqzC0xtpdoODQJuJjRh Y+lWCW/PEim9h2FCbB9HTDgpv/HyKB4gJlTDM11+Y/5UpK4Nex4ewG3koN3BTvxO N66JMSlMqmn1ZmJuJsOpoVnu4IvJ1WsJlTX0N9PKoO/Jm7yENQjbhG7OIeLz3v5J TVXltxdNNig6QjkQCUCpm5gL8Y4ey3CG46yjsd6VP/NSCQzuIqpLD143c9BUYlnA JhWlk8A1Lx27T1pa79Ic2EnXkq4s5yVsVxRLG1DLiFzO6jqxzjFV4OLlR67CPhba tkCqsChE5lVoKC3yBTXM0dIy84xz7Lcmsca8ZqDDo0ElXqxxU+OvT1FlcDdMY/hK vkxNgCygzb5bSng6Gftf =j7oR -----END PGP SIGNATURE----- --cP7UnHfFbnO8KeO6I8TuUPPtGogAbEUl3--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?745e3da8-3083-a135-ad5d-d60d5de41dc1>