From patchwork Mon Mar 2 14:50:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Thiery X-Patchwork-Id: 1247693 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=dT1+9Hqc; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48WNPl2wSCz9sRR for ; Tue, 3 Mar 2020 01:51:23 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id B9BCA85ABE; Mon, 2 Mar 2020 14:51:21 +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 ImKQWZLsRDDU; Mon, 2 Mar 2020 14:51:19 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id AB12D8593F; Mon, 2 Mar 2020 14:51:19 +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 A64A91BF39F for ; Mon, 2 Mar 2020 14:51:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A31CC84E49 for ; Mon, 2 Mar 2020 14:51:08 +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 dbEi3_9If7DF for ; Mon, 2 Mar 2020 14:51:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 7D41385725 for ; Mon, 2 Mar 2020 14:50:39 +0000 (UTC) Received: by mail-wm1-f49.google.com with SMTP id e26so5346941wme.5 for ; Mon, 02 Mar 2020 06:50:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uuArVBDxz9iADI5APulF8wilPzE8cA+kT6+NoXEHoLg=; b=dT1+9HqcZaV7Tb30tOYR/HC8nh+MV7GKSOp5JXfQ1ezpa9aUPdXq7j8a8dQVyEjWQM eXq/ygsIXCSvyOktWIU57Opc+KuEvYYCoqNmQPePburI96drs3o7yFpBmrl5ATF9S4fI p9hug6Wb6lPJ5NjKD6aif+OtDY1oA6gsbKbTsI19eoc5dsOdoQYEJJ6WGxlrl9zP6DI+ 1294wSFlmIbDr722BMwJrCfPOyEjbAB6eiywBr1ylMOin7cIi2FgVmZJ2zOKjsX8pkBT l4mzeudeCPrmHJZeniIUN9CU/t6MemHyuJpWnEfqRfmWC3KdlFN9wrVtLgpSG43Z6ZsC rpPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uuArVBDxz9iADI5APulF8wilPzE8cA+kT6+NoXEHoLg=; b=XRN2uN3XoPD4C1WKFfoAoMLeLJ8i4pY3UiV7AFVDQsqo7FY/mJ/1h61vKygKPeAJVA xD9ZBXpsvGdeZ+yDFnSrnmYUL+cnBJTfbQw8IpIm029gzTH1zQzzd73OzKkteb7dRJD7 HE9IrUc5gSh4PfbdhPzEDyWqKdUbHU7wY/kFHSEwFYouoqQNfYlwIY73+cMvErqN5giw ueDJuXworfdfrhh36anTSWL4P9CEo9a5pwP9Xs+g1m2fVkLumpaDQnU97PlXwo5twy4X ImOekB9uFnUn6NQ4iaLWl3/rSR28ChOjaPXH9/dPh1qz6OJ5knF1kXuJLONyMNzfP0gW X9Kg== X-Gm-Message-State: APjAAAVW2URBNowwO1pcNma7TZHqrdv+qHutXMHvKPOg1XYyRu+6WrUB BIuovBVxUhNatcqipuMpf9vFuqLK X-Google-Smtp-Source: APXvYqwoTtWYamFBIAzml1Wa1qlTzEbuZYlnaWvaiUsyI81ZLgxMWSSOpUtICIuJ7bH142mx7oQroA== X-Received: by 2002:a7b:ce09:: with SMTP id m9mr20197774wmc.49.1583160637674; Mon, 02 Mar 2020 06:50:37 -0800 (PST) Received: from hthiery01.sab.local ([213.135.10.150]) by smtp.gmail.com with ESMTPSA id h17sm29648355wro.52.2020.03.02.06.50.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Mar 2020 06:50:37 -0800 (PST) From: Heiko Thiery To: buildroot@buildroot.org Date: Mon, 2 Mar 2020 15:50:06 +0100 Message-Id: <20200302145013.9574-5-heiko.thiery@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200302145013.9574-1-heiko.thiery@gmail.com> References: <20200302145013.9574-1-heiko.thiery@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v4 04/12] support/scripts/pkg-stats: store licences of package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Thiery , Thomas Petazzoni , Titouan Christophe Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Heiko Thiery --- support/scripts/pkg-stats | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats index c40fe61d9e..b0ee4f3bac 100755 --- a/support/scripts/pkg-stats +++ b/support/scripts/pkg-stats @@ -56,7 +56,7 @@ http_pool = None class Package: - all_licenses = list() + all_licenses = dict() all_license_files = list() all_versions = dict() all_ignored_cves = dict() @@ -65,6 +65,7 @@ class Package: self.name = name self.path = path self.infras = None + self.license = None self.has_license = False self.has_license_files = False self.has_hash = False @@ -125,6 +126,7 @@ class Package: var = self.pkgvar() if var in self.all_licenses: self.has_license = True + self.license = self.all_licenses[var] if var in self.all_license_files: self.has_license_files = True @@ -387,7 +389,7 @@ def package_init_make_info(): if value == "unknown": continue pkgvar = pkgvar[:-8] - Package.all_licenses.append(pkgvar) + Package.all_licenses[pkgvar] = value elif pkgvar.endswith("_LICENSE_FILES"): if pkgvar.endswith("_MANIFEST_LICENSE_FILES"):