[Buildroot] [git commit branch/2017.02.x] core/download: fix source check for git method

Peter Korsgaard peter at korsgaard.com
Mon May 15 12:09:04 UTC 2017


commit: https://git.buildroot.net/buildroot/commit/?id=f99117fd8b83fdfb3842140e0053b14cc2c12424
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2017.02.x

Running foo-source-check on packages retrieved from git fails.

This is because there is no associated stamp file, so we do not have a
rule-assignment that sets PKG for foo-source-check.

But it does not make sense to have a stamp file at all, because
source-check is not supposed to change anything: the status after is
exactly the same as before; nothing is downlaoded, so there is no
progress (whatsoever) to memorise.

Fix that by just defining PKG in the source-check rule definition.

Fixes #9796.

Reported-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
(cherry picked from commit 4c0aacbc317d298397cede593f74ece26d0a89f0)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 package/pkg-generic.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index e8a8021..fd8c217 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -683,6 +683,7 @@ $(1)-legal-source:	$$($(2)_TARGET_ACTUAL_SOURCE)
 endif # actual sources != sources
 endif # actual sources != ""
 
+$(1)-source-check: PKG=$(2)
 $(1)-source-check:
 	$$(foreach p,$$($(2)_ALL_DOWNLOADS),$$(call SOURCE_CHECK,$$(p))$$(sep))
 


More information about the buildroot mailing list