diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2016-07-03 11:50:01 +0200 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2016-07-03 13:00:53 +0200 |
commit | 235ac0cc185b453c475cfde32f0ba00da0137e36 (patch) | |
tree | 26bd5a7c88bea85d99b806b9807fc22af5e629cc /package/pkg-generic.mk | |
parent | a0aa7e0e1750f6ace2879ea8adb1425a41431b79 (diff) |
pkg-generic: check that SITE has a value when SOURCE
Currently, when an user forgets to define a SITE, he gets some fairly
weird download failure. In order to make things easier to diagnose, this
commit adds a check in the package infrastructure that verifies that if
SOURCE has a value, SITE is not empty.
Cc: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/pkg-generic.mk')
-rw-r--r-- | package/pkg-generic.mk | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index dab455c40..0c9c7ab74 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -938,6 +938,12 @@ endif $(1)-source \ $(1)-source-check +ifneq ($$($(2)_SOURCE),) +ifeq ($$($(2)_SITE),) +$$(error $(2)_SITE cannot be empty when $(2)_SOURCE is not) +endif +endif + ifeq ($$(patsubst %/,ERROR,$$($(2)_SITE)),ERROR) $$(error $(2)_SITE ($$($(2)_SITE)) cannot have a trailing slash) endif |