From patchwork Sun Jan 5 09:23:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Thiery X-Patchwork-Id: 1217720 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.b="Jnpbw/cc"; 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 47rCrM3jKDz9sPJ for ; Sun, 5 Jan 2020 20:24:03 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 1615E878B0; Sun, 5 Jan 2020 09:24:00 +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 v8FDv0nWz7lz; Sun, 5 Jan 2020 09:23:58 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 9B3E58789C; Sun, 5 Jan 2020 09:23:58 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 5BB241BF285 for ; Sun, 5 Jan 2020 09:23:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 5622D203EA for ; Sun, 5 Jan 2020 09:23:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6aQI2+-gqiz9 for ; Sun, 5 Jan 2020 09:23:55 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by silver.osuosl.org (Postfix) with ESMTPS id 36F222047D for ; Sun, 5 Jan 2020 09:23:55 +0000 (UTC) Received: by mail-wm1-f46.google.com with SMTP id p9so12042492wmc.2 for ; Sun, 05 Jan 2020 01:23:55 -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=5IatiG69HNhmVWHRacCwq8uBd5h4e5WSCNMYg19DdyQ=; b=Jnpbw/cc3d6f1MiePEoLMc5XLfB4q4Svvu9LXysUfQy/eTFR9ghZsvaUF3ro4nF+Hi wxebV/AImK4GVTYEDSttI+a1rz1LuguLFmXEG+b4HbyxFOpyIoNDhUuDq2EdrgFepPxR DTZAjWzP7fIqibnZAA7P/EkwewgromT9cG8H0abBvsAwcUY7+T1eNwxE52F3p/zcWw4U m8T72/7RYAB055DKIKiXLsJoPeqH1Wtma0RXm2L3MeLgvd9YDXjgdlhvAh3k5nV+N22a 0qERgEQmdWA5R3B3/880J9TvUmBI+WDjWoXGvAuXqFr+812+fPhb4k7NFkMfn7NM1Yv5 VXEQ== 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=5IatiG69HNhmVWHRacCwq8uBd5h4e5WSCNMYg19DdyQ=; b=K7z9g3sz3K397QsUKJUJqk/1WKHo3v3LC4rgLdv5BwpNlqog0i0LvfYdhjwyi+A0g4 dG3gy5JdX8AZmTvE63PUoNvh63m3tdzUf/nep6dG4HfXxXaKH3KltZBS/mfU/WkIf6Gr Yyg63F6ihCUirJm7N5I/sRzexVvqxhddMDV0My94z9Xka/9wkog0s+gi3QW+ygILpQ5Q ur++CNYKNG+k/gQdo3jjWxR49StEog5pcVyCT+YMQL/BHyg3L9W1HLzWUnDmERkhXi8v gMiGKUU5D0SWj7UdONWX77iHIZHkjn7xCNDK2PE1rykTGYm4x83FnN/3JC78Zfami7mJ Rf0A== X-Gm-Message-State: APjAAAXN9is0mR3VLU2/rroiezb8D+BA0dBVBdVSmGKqyd2sIX9xrf8H 4PdUS07ODn55yrncVSia+vumyZou X-Google-Smtp-Source: APXvYqxuRu4EMb88Uc/3laN2ZIcLH6WLH/DF0bTL1C/RIYz2aPzl1N/lotN2F3Arzsxf2k/zXCKC8A== X-Received: by 2002:a7b:c084:: with SMTP id r4mr27564251wmh.99.1578216233237; Sun, 05 Jan 2020 01:23:53 -0800 (PST) Received: from t450s.fritz.box (ip5f589927.dynamic.kabel-deutschland.de. [95.88.153.39]) by smtp.gmail.com with ESMTPSA id r62sm19600729wma.32.2020.01.05.01.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jan 2020 01:23:52 -0800 (PST) From: Heiko Thiery To: buildroot@buildroot.org Date: Sun, 5 Jan 2020 10:23:26 +0100 Message-Id: <20200105092329.6288-5-heiko.thiery@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200105092329.6288-1-heiko.thiery@gmail.com> References: <20200105092329.6288-1-heiko.thiery@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 4/8] 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 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 43d14785a1..c10eb79a08 100755 --- a/support/scripts/pkg-stats +++ b/support/scripts/pkg-stats @@ -48,7 +48,7 @@ http_pool = None class Package: - all_licenses = list() + all_licenses = dict() all_license_files = list() all_versions = dict() @@ -56,6 +56,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 @@ -112,6 +113,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 @@ -261,7 +263,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"):