From patchwork Wed Nov 2 22:58:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 80562 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp364735qge; Wed, 2 Nov 2016 16:00:45 -0700 (PDT) X-Received: by 10.98.24.198 with SMTP id 189mr11097051pfy.31.1478127645760; Wed, 02 Nov 2016 16:00:45 -0700 (PDT) Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id w190si5539137pfb.209.2016.11.02.16.00.45; Wed, 02 Nov 2016 16:00:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 91AA371B7D; Wed, 2 Nov 2016 23:00:42 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by mail.openembedded.org (Postfix) with ESMTP id 8664F6080F for ; Wed, 2 Nov 2016 22:58:19 +0000 (UTC) Received: by mail-wm0-f47.google.com with SMTP id p190so298754343wmp.1 for ; Wed, 02 Nov 2016 15:58:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=ulRIPhqxGzRqwl2OfsrTzVp/mll4AseXk/9XEJN3GAQ=; b=rMF+kQpFPyD1xEU3mGCXky0XJ03L2MwyyIRamTpi4FmCFipLf5E61ALcVNrPHXNGdZ V1ywoYSkIfBJFvDrh3IIzKJhCM6vBndqZ0xZrSML3PEBGOmxSsq8dRX+D6gMvRynRIXj ayFyo6McVzd2dsNvvyOxvQJovTCvs/v1WvK4g0J4yEFpCRKtQRD06kp29gxyUj4yHUsz sOtwFDF9nHfPbvB+TqZDMryFs+J2dE9mtTC2gvnoEwX8fiDexTBKlWzRH9LihmW5vbGX mYPwlf6bde29IxstGW4/CQtlEpQyhQ8Iw9J2jftlxvZn6prQqTgf2w/An9sLKTDSSF9Q 6U3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=ulRIPhqxGzRqwl2OfsrTzVp/mll4AseXk/9XEJN3GAQ=; b=I5+T+WhbVD7LwPJYv9tmWHTdxXts0DWLz4chetcr2BwJ1TY403wrKI5rz7lGOvuX/j wO1a8WzxeE4PBMSQH1YZ+zZaIlgEAaNCcni4z6fU5WtStvEgpWbTpSbH4+G1nDftdB6Y rSVhWvtj/7mRhWJNY1pp3CDk6diQh2lRdR9L9baUfhH0qMGHUMgqm5eZhSkMP1bZXJFU zdV0syp39WBMwbYZR0SxPQEuU13meOOMxfpZ1jmC546NePQspn+92B6PR+cZ/mXKnb70 dcgbx8UkgSIMYONb7/aYS9tc//fGRyHhHw4ULe+9MlpvV+0tArIx0oQLdgEZcNsV953F drig== X-Gm-Message-State: ABUngvdvp9XkWtyWLqwKETGDfqGM+JShTduP6EfwusTAYv4nzr0vu78NBA8v8bnUuD9MErnz X-Received: by 10.194.80.194 with SMTP id t2mr4629264wjx.75.1478127500862; Wed, 02 Nov 2016 15:58:20 -0700 (PDT) Received: from flashheart.burtonini.com (home.burtonini.com. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id 198sm38830488wmn.14.2016.11.02.15.58.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Nov 2016 15:58:20 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Wed, 2 Nov 2016 22:58:16 +0000 Message-Id: <1478127496-13033-1-git-send-email-ross.burton@intel.com> X-Mailer: git-send-email 2.8.1 Subject: [OE-core] [PATCH] classes/license: copy licenses even if there are no checksummed files X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Previously do_populate_lic would bail writing the license files (such as the MIT license text) to deploy/licenses/${PN}/ if there were no files listed in LIC_FILES_CHKSUM. In general this isn't a problem since LIC_FILES_CHKSUM was effectively a required field, and for packages which don't have traditional content was generally set to a separate license such as ${COREBASE}/meta/COPYING.MIT. However LIC_FILES_CHKSUM is now only required if there are sources in SRC_URI, so oe-core b18fa5f removed these now redundant values. The unexpected side effect of this is that that recipes that generate their content (such as os-release) or are otherwise "interesting" (such as perf) don't have their license files copied over, resulting in warnings from do_rootfs. Resolve this by not returning early if LIC_FILES_CHKSUM is empty, and always copy the references license files. Signed-off-by: Ross Burton --- meta/classes/license.bbclass | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) -- 2.8.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass index 660b85f..afcfbfc 100644 --- a/meta/classes/license.bbclass +++ b/meta/classes/license.bbclass @@ -390,7 +390,7 @@ def find_license_files(d): from collections import defaultdict, OrderedDict # All the license files for the package - lic_files = d.getVar('LIC_FILES_CHKSUM', True) + lic_files = d.getVar('LIC_FILES_CHKSUM', True) or "" pn = d.getVar('PN', True) # The license files are located in S/LIC_FILE_CHECKSUM. srcdir = d.getVar('S', True) @@ -469,12 +469,6 @@ def find_license_files(d): if not generic_directory: bb.fatal("COMMON_LICENSE_DIR is unset. Please set this in your distro config") - if not lic_files: - # No recipe should have an invalid license file. This is checked else - # where, but let's be pedantic - bb.note(pn + ": Recipe file does not have license file information.") - return lic_files_paths - for url in lic_files.split(): try: (type, host, path, user, pswd, parm) = bb.fetch.decodeurl(url)