All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/pkg-golang: fix illegal variable reference
@ 2018-08-15  7:16 Mirza Krak
  2018-08-15 12:36 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Mirza Krak @ 2018-08-15  7:16 UTC (permalink / raw)
  To: buildroot

References to variables inside $(eval) blocks must be with a double
dollar sign, otherwise we end up with unintuitive and undesired behavior
according to the description in pkg-generic.mk

Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
---
 package/pkg-golang.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/pkg-golang.mk b/package/pkg-golang.mk
index bf178622b5..6eacd14180 100644
--- a/package/pkg-golang.mk
+++ b/package/pkg-golang.mk
@@ -77,9 +77,9 @@ $(2)_INSTALL_BINS ?= $(1)
 # of GOPATH. It usually resolves around domain/vendor/software. By default, we
 # derive domain/vendor/software from the upstream URL of the project, but we
 # allow $(2)_SRC_SUBDIR to be overridden if needed.
-$(2)_SRC_DOMAIN = $$(call domain,$($(2)_SITE))
-$(2)_SRC_VENDOR = $$(word 1,$$(subst /, ,$$(call notdomain,$($(2)_SITE))))
-$(2)_SRC_SOFTWARE = $$(word 2,$$(subst /, ,$$(call notdomain,$($(2)_SITE))))
+$(2)_SRC_DOMAIN = $$(call domain,$$($(2)_SITE))
+$(2)_SRC_VENDOR = $$(word 1,$$(subst /, ,$$(call notdomain,$$($(2)_SITE))))
+$(2)_SRC_SOFTWARE = $$(word 2,$$(subst /, ,$$(call notdomain,$$($(2)_SITE))))
 
 $(2)_SRC_SUBDIR ?= $$($(2)_SRC_DOMAIN)/$$($(2)_SRC_VENDOR)/$$($(2)_SRC_SOFTWARE)
 $(2)_SRC_PATH = $$(@D)/$$($(2)_WORKSPACE)/src/$$($(2)_SRC_SUBDIR)
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 1/1] package/pkg-golang: fix illegal variable reference
  2018-08-15  7:16 [Buildroot] [PATCH 1/1] package/pkg-golang: fix illegal variable reference Mirza Krak
@ 2018-08-15 12:36 ` Thomas Petazzoni
  2018-08-15 12:48   ` Mirza Krak
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2018-08-15 12:36 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 15 Aug 2018 09:16:09 +0200, Mirza Krak wrote:
> References to variables inside $(eval) blocks must be with a double
> dollar sign, otherwise we end up with unintuitive and undesired behavior
> according to the description in pkg-generic.mk
> 
> Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
> ---
>  package/pkg-golang.mk | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

I hesitated a bit between applying to master or next. It is a bug fix,
so it should be master. But it doesn't cause any visible issue for now,
so maybe not master. In the end, since the fix is pretty trivial, I
applied to master.

However, I rewrote the commit log to provide (I believe) a better
explanation of the issue being fixed.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 1/1] package/pkg-golang: fix illegal variable reference
  2018-08-15 12:36 ` Thomas Petazzoni
@ 2018-08-15 12:48   ` Mirza Krak
  0 siblings, 0 replies; 3+ messages in thread
From: Mirza Krak @ 2018-08-15 12:48 UTC (permalink / raw)
  To: buildroot

On Wed, Aug 15, 2018 at 2:36 PM, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
> Hello,
>
> On Wed, 15 Aug 2018 09:16:09 +0200, Mirza Krak wrote:
>> References to variables inside $(eval) blocks must be with a double
>> dollar sign, otherwise we end up with unintuitive and undesired behavior
>> according to the description in pkg-generic.mk
>>
>> Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
>> ---
>>  package/pkg-golang.mk | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> I hesitated a bit between applying to master or next. It is a bug fix,
> so it should be master. But it doesn't cause any visible issue for now,
> so maybe not master. In the end, since the fix is pretty trivial, I
> applied to master.
>
> However, I rewrote the commit log to provide (I believe) a better
> explanation of the issue being fixed.

Much better :). Thanks!

-- 
Mirza Krak | Embedded Solutions Architect | https://mender.io

 Northern.tech AS | @northerntechHQ

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-15 12:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-15  7:16 [Buildroot] [PATCH 1/1] package/pkg-golang: fix illegal variable reference Mirza Krak
2018-08-15 12:36 ` Thomas Petazzoni
2018-08-15 12:48   ` Mirza Krak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.