From patchwork Sun Jul 3 09:50:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 643725 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rj55G2t6Nz9t0h for ; Sun, 3 Jul 2016 19:51:30 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C38928A552; Sun, 3 Jul 2016 09:51:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A4gavA5S1ZMx; Sun, 3 Jul 2016 09:51:24 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 82BCD8A5AF; Sun, 3 Jul 2016 09:51:03 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id DEAD41C10B8 for ; Sun, 3 Jul 2016 09:50:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id DC21C87354 for ; Sun, 3 Jul 2016 09:50:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sAvlO2o40U4p for ; Sun, 3 Jul 2016 09:50:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (down.free-electrons.com [37.187.137.238]) by fraxinus.osuosl.org (Postfix) with ESMTP id 05433873FC for ; Sun, 3 Jul 2016 09:50:31 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 294A1303; Sun, 3 Jul 2016 11:50:31 +0200 (CEST) Received: from localhost (LFbn-1-6691-76.w90-120.abo.wanadoo.fr [90.120.129.76]) by mail.free-electrons.com (Postfix) with ESMTPSA id 1ECCF44E; Sun, 3 Jul 2016 11:50:15 +0200 (CEST) From: Thomas Petazzoni To: buildroot@uclibc.org Date: Sun, 3 Jul 2016 11:50:01 +0200 Message-Id: <1467539401-3411-13-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1467539401-3411-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1467539401-3411-1-git-send-email-thomas.petazzoni@free-electrons.com> Cc: Thomas Petazzoni , Thomas De Schampheleire Subject: [Buildroot] [PATCH 13/13] pkg-generic: check that SITE has a value when SOURCE X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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 Signed-off-by: Thomas Petazzoni --- package/pkg-generic.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index dab455c..0c9c7ab 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