From patchwork Sat Feb 22 08:57:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Thiery X-Patchwork-Id: 1242459 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.133; helo=hemlock.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=cy9IJJEb; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48PjGt6m0Fz9sPk for ; Sat, 22 Feb 2020 20:10:46 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 3B99787F5A; Sat, 22 Feb 2020 09:10:43 +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 KvwlFQnMXPiC; Sat, 22 Feb 2020 09:10:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 7870A87FF7; Sat, 22 Feb 2020 09:10:42 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id A19271BF5D7 for ; Sat, 22 Feb 2020 09:10:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9C08B86E33 for ; Sat, 22 Feb 2020 09:10:37 +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 oAl0zxbK7swA for ; Sat, 22 Feb 2020 09:10:36 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5293886DEA for ; Sat, 22 Feb 2020 09:10:36 +0000 (UTC) Received: by mail-wr1-f51.google.com with SMTP id m16so4646873wrx.11 for ; Sat, 22 Feb 2020 01:10:36 -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=87TfTpPePY98SWww2llHX+6LRCYIvl6wxBAqnIqXTgI=; b=cy9IJJEbiFgJzjkEVzQt3h6cPLo5SZnS4uoP2v5aoQwaXcUO+1d1bevf2nxcN8Cul5 wqrXHdoWnf7fAua25NVHSmdeQA06OLKeser3FVyAt2dzW0xJWftU2+BWbWDSjnlfJ8V7 /Dd43JRitHk/h7KpKtQ4jNKczOHkk18TUM8xaesW4fDLBd9AWNWskJqkpsBRBwt15to+ TIA/VarJiq+BJoh5nzDkqc2e2vakrv0LRE3+reXjP2D7OXsQPfSICvCwho+dS+L2RZAS yHYbpdkoU5rYzAkuf9wKhnxhKY2N3GMWbS8t9UNh1dAZkJI3DHpwaW4wVRntGbTcrmwr OMAg== 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=87TfTpPePY98SWww2llHX+6LRCYIvl6wxBAqnIqXTgI=; b=CkcFjDIBiFvlVlzo55itVKP9iwfjJXIlXP/8zGe1U/Qj7BsV5HuKEMd0DD5KOwYwcb 2c7DXoh7RICcEmHPedWwag5qZ0t0YcStrY6DYGEPT6h9E20hQ2dt7Sc3I6M8Zx6PcZ/x NJkw+oP+gWy32mpPXznIyeOM042PffZbAl/PHiODEb3ODwV4fMD1SysNqjZZgvnNrhgz 1/JZIVFnDQWr24qMwLMnwLJfBi0+4t1sWGnNUISB15o9bRYfVaH4UJ8T/GeXvjDACJiW 3eUbsGh7r8PyfMaiBCumuWxSprriCtkgkFGPVzqMUNhf8zHgVmeLm+yuaob7XQhX5rkU Qr7w== X-Gm-Message-State: APjAAAVHbbCepDOgs0DganDlXWgQ+u8HJkeJvmMke60qoVgNSgiowp9o HgI1fXgFYjf9ZKWypqB0kQHLE5Vk X-Google-Smtp-Source: APXvYqzaKpEjni5vms9/saZ71BUJg6pJWygyxM634C3ZLL/nqtfhh90pZArbk5aiqioKGvtS0RHwCg== X-Received: by 2002:adf:fe83:: with SMTP id l3mr56114203wrr.41.1582362634606; Sat, 22 Feb 2020 01:10:34 -0800 (PST) Received: from t450s.fritz.box (ip5f589959.dynamic.kabel-deutschland.de. [95.88.153.89]) by smtp.gmail.com with ESMTPSA id l6sm603970wrb.75.2020.02.22.01.10.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Feb 2020 01:10:33 -0800 (PST) From: Heiko Thiery To: buildroot@buildroot.org Date: Sat, 22 Feb 2020 09:57:08 +0100 Message-Id: <20200222085715.23769-5-heiko.thiery@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200222085715.23769-1-heiko.thiery@gmail.com> References: <20200222085715.23769-1-heiko.thiery@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v3 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 Reviewed-by: Titouan Christophe Tested-by: Titouan Christophe --- 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 643272e9d2..ebaf04465e 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 @@ -122,6 +123,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 @@ -384,7 +386,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"):