From patchwork Wed Mar 12 22:29:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 329730 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id CF7A42C00B1 for ; Thu, 13 Mar 2014 09:29:41 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6996B8C9CD; Wed, 12 Mar 2014 22:29:40 +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 kKv05gSUSsqc; Wed, 12 Mar 2014 22:29:38 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id AB80B8BE55; Wed, 12 Mar 2014 22:29:38 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id D01151C1045 for ; Wed, 12 Mar 2014 22:29:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id CCCF093C6E for ; Wed, 12 Mar 2014 22:29:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tbQH1n--uXhe for ; Wed, 12 Mar 2014 22:29:37 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) by hemlock.osuosl.org (Postfix) with ESMTPS id D199693BEA for ; Wed, 12 Mar 2014 22:29:36 +0000 (UTC) Received: by mail-wg0-f41.google.com with SMTP id n12so149041wgh.24 for ; Wed, 12 Mar 2014 15:29:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=hjptZJCDYfqiJeJv4TP8O+Uh+0GBS5pXw+1gKug9mH4=; b=dQXnUK0Jv/MxqClOTP0zUbGQFFQ8VJxD+CrjMZ6SybGUTmBQ4s6R8dJl402xR9UxSR ztOwUHMCoaV2UTE52fY3tsumqCkCIC/mvJBgBHQkpqDgyOSH9LgMWpmOKEZ4aFvxZivj khASgveYGaClBNZ6YDnFw8mfGJDvYKFmuXgCRi+1/Qeiq4ceBXLkqNo6vYR1IWLkngzy dj6Ponh0C+ihpo7X2lzd89xlYNCGcOCQx9WUNN74ZWjKRlGSyBb0lDGwdXZVyE/P7Mwj db28dizn3brPJ97s+9V7oPd5gMobOTHfxEnb7SIk0ULftlVR+kVqwcjh8lY+Eo3IOQuh +L8A== X-Received: by 10.180.164.174 with SMTP id yr14mr593704wib.18.1394663375459; Wed, 12 Mar 2014 15:29:35 -0700 (PDT) Received: from gourin.bzh.lan (ks3095497.kimsufi.com. [94.23.60.27]) by mx.google.com with ESMTPSA id d6sm1754928wiz.4.2014.03.12.15.29.33 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Mar 2014 15:29:34 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Wed, 12 Mar 2014 23:29:27 +0100 Message-Id: <1394663367-11778-1-git-send-email-yann.morin.1998@free.fr> X-Mailer: git-send-email 1.8.3.2 Cc: Thomas Petazzoni , "Yann E. MORIN" Subject: [Buildroot] [PATCH] legal-info: extract even no-redistribute packages X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 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-bounces@busybox.net From: "Yann E. MORIN" Currently, if a package is marked _REDISTRIBUTE = NO, then legal-info will not try to extract it first. If that package also declares some _LICENSE_FILES, legal-info fails if it is the only action we're trying to run: $ cat defconfig BR2_INIT_NONE=y BR2_PACKAGE_LIBFSLCODEC=y $ make BR2_DEFCONFIG=$(pwd)/defconfig defconfig $ make libfslcodec-legal-info /bin/sh: /home/ymorin/dev/buildroot/O/legal-info/licenses.txt: No such file or directory make[1]: *** [libfslcodec-legal-info] Error 1 Fix this by always having legal-info extract the archives if one or more _LICENSE_FILES are specified. We do this for all types of packages: overriden, local or 'normal' remote packages. Even though we do not save the sources for the overriden or local packages, we need to save their licensing info, so we need to extract them. Signed-off-by: "Yann E. MORIN" Cc: Thomas De Schampheleire Cc: Thomas Petazzoni Cc: Fabio Porcedda Chamges v1 -> v2: - this is not fixing the autobuilders failure it was written to fix so remove the references to such build failures (Thomas P) - also extract overriden and local packages (Fabio) Tested-by: Luca Ceresoli Acked-by: Luca Ceresoli --- package/pkg-generic.mk | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 339c3eb..d201a77 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -555,15 +555,13 @@ $(2)_MANIFEST_LICENSE_FILES = $$($(2)_LICENSE_FILES) endif $(2)_MANIFEST_LICENSE_FILES ?= not saved -ifeq ($$($(2)_REDISTRIBUTE),YES) -ifneq ($$($(2)_SITE_METHOD),local) -ifneq ($$($(2)_SITE_METHOD),override) +# If the package declares _LICENSE_FILES, we need to extract it, +# for overriden, local or normal remote packages alike. +ifneq ($$($(2)_LICENSE_FILES),) # Packages that have a tarball need it downloaded and extracted beforehand $(1)-legal-info: $(1)-extract $(REDIST_SOURCES_DIR_$(call UPPERCASE,$(4))) $(2)_MANIFEST_TARBALL = $$($(2)_SOURCE) endif -endif -endif $(2)_MANIFEST_TARBALL ?= not saved # legal-info: produce legally relevant info.