From patchwork Sun Mar 21 09:26:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Spooren X-Patchwork-Id: 1456269 X-Patchwork-Delegate: mail@aparcar.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=q9ELcaaC; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F3C3z0LFwz9sSC for ; Sun, 21 Mar 2021 20:28:31 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=zeoyWu7ogTGFOiCgH28u6wxq5RLTOjPY57sKNL6iulQ=; b=q9ELcaaCOhmEKHIU1RLYTufN+P DrhzJQ2S2RdbGvXU4/OnqYwW+5u11tWwCHoSuwITunUZJxiwSvfHqDc5NxrtdGsSZHambgW6Kbu1e 379bmuXNzDcz6ghzrZc1dgaop1Rgz2jVvTOeAozxjcKMpkyc8s5iumrtWXpu9cINx7BJkeD//XWSX pyhX3N/ZvzOfdoSlrHbxpIXmbMpTUmIo+Rri3iy8/1li5GoEbd+JwN7T9SKM+y/mbgvS602Pgugvb MdZkrT6n/7fqlW7/REzz/3eeoXTSsDZkKaI3bvLrObT6xmhjAwpD0MY+3N491T1gSUTVxWMeFqnem o0YvJ0zQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lNuMB-009o8Q-Ux; Sun, 21 Mar 2021 09:26:48 +0000 Received: from relay7-d.mail.gandi.net ([217.70.183.200]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lNuM5-009o7m-W3 for openwrt-devel@lists.openwrt.org; Sun, 21 Mar 2021 09:26:44 +0000 X-Originating-IP: 72.235.130.177 Received: from dawn.lan (udp102715uds.hawaiiantel.net [72.235.130.177]) (Authenticated sender: mail@aparcar.org) by relay7-d.mail.gandi.net (Postfix) with ESMTPA id 531A020004; Sun, 21 Mar 2021 09:26:37 +0000 (UTC) From: Paul Spooren To: openwrt-devel@lists.openwrt.org Cc: ~aparcar/openwrt-devel-test@lists.sr.ht, Paul Spooren Subject: [PATCH] build,json: fix duplicates in default_packages Date: Sat, 20 Mar 2021 23:26:27 -1000 Message-Id: <20210321092627.481352-1-mail@aparcar.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210321_092642_818614_A8C52EDF X-CRM114-Status: UNSURE ( 6.81 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: Spam detection software, running on the system "desiato.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Calling without the DUMP=1 argument causes the target specific Makefile to be "included" again which adds the target specific packages twice, once on the actual run and once included from `include/tar [...] Content analysis details: (-0.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.200 listed in list.dnswl.org] X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Calling without the DUMP=1 argument causes the target specific Makefile to be "included" again which adds the target specific packages twice, once on the actual run and once included from `include/target.mk`. This led to duplicate package entries, causing confusion in downstream projects using the generated JSON files. While at it, apply `black` style to Python script. Signed-off-by: Paul Spooren --- scripts/json_overview_image_info.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py index ca6fbbc962..23d8dcb857 100755 --- a/scripts/json_overview_image_info.py +++ b/scripts/json_overview_image_info.py @@ -38,9 +38,10 @@ if output: "make", "--no-print-directory", "-C", - "target/linux/{}".format(output['target'].split('/')[0]), + "target/linux/{}".format(output["target"].split("/")[0]), "val.DEFAULT_PACKAGES", "val.ARCH_PACKAGES", + "DUMP=1", ], stdout=PIPE, stderr=PIPE,