From patchwork Tue Oct 8 09:04:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Asaf Kahlon X-Patchwork-Id: 1173142 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.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="U+1AyUTc"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46nWck5Mmyz9sPk for ; Tue, 8 Oct 2019 20:04:22 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E373F22274; Tue, 8 Oct 2019 09:04:19 +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 EO8qBNnODbGl; Tue, 8 Oct 2019 09:04:19 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 0EC0622636; Tue, 8 Oct 2019 09:04:19 +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 812B21BF337 for ; Tue, 8 Oct 2019 09:04:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 612E887646 for ; Tue, 8 Oct 2019 09:04:15 +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 fhj6fgi70i2o for ; Tue, 8 Oct 2019 09:04:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by whitealder.osuosl.org (Postfix) with ESMTPS id B3102875F0 for ; Tue, 8 Oct 2019 09:04:14 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id a6so2236058wma.5 for ; Tue, 08 Oct 2019 02:04:14 -0700 (PDT) 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=kKGIvDnnIsLVG3Y8iDVgNEhkV2ZHEHQSWd8G/hT4MKk=; b=U+1AyUTcptWi8f4DD5QtOV3FPXVXujsfstokz4Tn2hG2PhSlhLxswLhvSaxFFE7avK +d11fZx6Rp0s8g3+oZlQRfuWeiI1aI5GFP8lzWRsBM29Ddo/IrKcNxTjnXjVrUwULWsl n5QKiIgPyI8zhcT8MbvaG3+oyo/GtvxSBjgxTaqn4MLF0lzUEiKBO8ZoMgPEkpyF9NLU XUteL5MSHJz43n0QdJLc3R0HyvUjriEjUKxtY+3+pcj96kpVLg9XZQffSEgy/hNHCq0O JPMRF86FtIJcKvXK2T3Imtg3w27Lv8kqNLzFLvtCl55CengZgEkg31+eLLx//mhF27Hq Oa4A== 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=kKGIvDnnIsLVG3Y8iDVgNEhkV2ZHEHQSWd8G/hT4MKk=; b=fLRCwCKbdpk1oqXZQj7gut9SkUh34Mmt1WG7RiUkt9gtsjHkod4PZ2eJZcQz34Zk6p geZl6CUWeSoCz+hZo/8hS6ohYY0Kb6sq3wM4zjl/v0JtIk+IBmMA1NI6y9+apAMb7s3h KvYRwIpmQ0hBwFBlUzhRwft3Lb2+vSeuPcID65UE7MtApaPPLBHms/9avu+WMP7P6N2j RyA/t8EHBSSzk4Vg0X+l921xiEw9bY/dHeUiuiKrPaProFSB9doyRLMvI+857PP0Hvqi uFWlXrk46PIFLiuxeRIpDpWF1StY1YD02lJoc87tKWsFVk7DMVy8cOwe8K5hvj2Ajp5Z znTg== X-Gm-Message-State: APjAAAXNiH2yeQT0lpDCaDxeYinEmXolHdh7q40Pmidi81ZO76hrnd05 oe76WUXeDb6g5KX2QjLvaYiJ3sHU X-Google-Smtp-Source: APXvYqxehFxIqcxJ5CPCphJC1hNTKmKDRyfCvRFicycfeMD6ERn8+sYNC7pTfU6z/2hzbCnY84YbsQ== X-Received: by 2002:a1c:2d54:: with SMTP id t81mr3015477wmt.167.1570525452975; Tue, 08 Oct 2019 02:04:12 -0700 (PDT) Received: from localhost.localdomain (bzq-84-108-5-46.cablep.bezeqint.net. [84.108.5.46]) by smtp.gmail.com with ESMTPSA id q15sm36880329wrg.65.2019.10.08.02.04.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2019 02:04:12 -0700 (PDT) From: Asaf Kahlon To: buildroot@buildroot.org Date: Tue, 8 Oct 2019 12:04:04 +0300 Message-Id: <20191008090404.26700-2-asafka7@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191008090404.26700-1-asafka7@gmail.com> References: <20191008090404.26700-1-asafka7@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] scanpypi: write every license file once 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: Asaf Kahlon Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" On some cases, when the package contains multiple license files and some of them from the same type, the scanpypi script will write the same license type more than once under _LICENSE. Hence, before creating the _LICENSE variable, we'll remove every possible duplication. Signed-off-by: Asaf Kahlon Reviewed-by: Yegor Yefremov --- utils/scanpypi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/scanpypi b/utils/scanpypi index 55b3d1e61c..b48eda49aa 100755 --- a/utils/scanpypi +++ b/utils/scanpypi @@ -461,6 +461,7 @@ class BuildrootPackage(): ' likely wrong, please change it if need be'.format( license=', '.join(licenses))) licenses = [self.metadata['info']['license']] + licenses = set(licenses) license_line = '{name}_LICENSE = {license}\n'.format( name=self.mk_name, license=', '.join(licenses)) @@ -473,6 +474,7 @@ class BuildrootPackage(): license_names.append(match.license.id) else: license_names.append("FIXME: license id couldn't be detected") + license_names = set(license_names) if len(license_names) > 0: license_line = ('{name}_LICENSE ='