core/download: fix source check for git method
authorYann E. MORIN <yann.morin.1998@free.fr>
Fri, 12 May 2017 15:54:29 +0000 (17:54 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 13 May 2017 13:08:41 +0000 (15:08 +0200)
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@free-electrons.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/pkg-generic.mk

index 3b26e6b4839b5f9d20cf81231b6e42e0b6569923..f4747049809eb066a5ad2cdcc6599e07b8f664f5 100644 (file)
@@ -694,6 +694,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))