From patchwork Thu Mar 25 20:44:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Spooren X-Patchwork-Id: 1458509 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=JTFDp3g1; 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 4F5xwm0j1Fz9sRN for ; Fri, 26 Mar 2021 07:46:48 +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=+pEIeZg3R72xjU/9QehhlvrujxEA7wZhSrLcT4vDBG8=; b=JTFDp3g1uTXNvp8CvQZq02oPNE x3e5hXO5/pEwNjEx9Y23AKpn/31jTJmuhutQYte7oozYsxB0eFUm3aR1ukhAtHGqbof6xG4YJtCeE e3jc0A+3/eCBsgOv+jJbZIZbofrlrlgM3nkv1krjI5azJROFMCnOSMYxa1KY7D2G9uJc7Rqa0vrZd R3KcNlTH/zzOi3ar7sRTaU6zOq7T15PE9CjbzFOxY3RxnejSrsj5xgdWVjNW3FO2r4KUeF3OJ5zH0 f88YpHTiOCs67OYbwtuE93n/DpBo+V5K6mFaKwIS0nbI6TQFSOY+wyGel8YTwPVY2qrE7Q+13x+fa e+0kgEtg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lPWr3-002ANl-Tx; Thu, 25 Mar 2021 20:45:22 +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 1lPWqz-002AMg-Du for openwrt-devel@lists.openwrt.org; Thu, 25 Mar 2021 20:45:19 +0000 X-Originating-IP: 72.235.130.75 Received: from dawn.lan (udp102614uds.hawaiiantel.net [72.235.130.75]) (Authenticated sender: mail@aparcar.org) by relay7-d.mail.gandi.net (Postfix) with ESMTPA id E846620004; Thu, 25 Mar 2021 20:45:08 +0000 (UTC) From: Paul Spooren To: openwrt-devel@lists.openwrt.org Cc: ~aparcar/openwrt-devel-test@lists.sr.ht, daniel@makrotopia.org, nbd@nbd.name, Paul Spooren Subject: [PATCH] build,json: 3rd fixup of default_packages Date: Thu, 25 Mar 2021 10:44:58 -1000 Message-Id: <20210325204458.2686421-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-20210325_204517_514332_5436CEB4 X-CRM114-Status: UNSURE ( 8.17 ) 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: This became a bit of a tragedy, caused by a corner cases which wasn't put into account during testing. DEFAULT_PACKAGES are defined in target/linux//Makefile but also in target/linux// [...] 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 This became a bit of a tragedy, caused by a corner cases which wasn't put into account during testing. DEFAULT_PACKAGES are defined in target/linux//Makefile but also in target/linux///target.mk. The latter was no longer imported when using DUMP=1, however not using DUMP=1 while running the Makefile in target/linux// caused duplicate packages in the list. As a solution, which should have been used from day 0, `make` runs in target/linux/ without DUMP=1, resulting in no duplicate packages and all inclusions from include/target.mk, linux/target//{Makefile, /target.mk} While at it, sort the list of default packages. Signed-off-by: Paul Spooren --- scripts/json_overview_image_info.py | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py index cd814a19c0..8dbd24af2d 100755 --- a/scripts/json_overview_image_info.py +++ b/scripts/json_overview_image_info.py @@ -33,28 +33,13 @@ for json_file in work_dir.glob("*.json"): ) if output: - output["default_packages"] = run( + default_packages, output["arch_packages"] = run( [ "make", "--no-print-directory", "-C", - "target/linux/{}".format(output["target"].split("/")[0]), + "target/linux/", "val.DEFAULT_PACKAGES", - "DUMP=1", - ], - stdout=PIPE, - stderr=PIPE, - check=True, - env=environ.copy().update({"TOPDIR": Path().cwd()}), - universal_newlines=True, - ).stdout.split() - - output["arch_packages"] = run( - [ - "make", - "--no-print-directory", - "-C", - "target/linux/{}".format(output["target"].split("/")[0]), "val.ARCH_PACKAGES", ], stdout=PIPE, @@ -62,7 +47,9 @@ if output: check=True, env=environ.copy().update({"TOPDIR": Path().cwd()}), universal_newlines=True, - ).stdout.strip() + ).stdout.splitlines() + + output["default_packages"] = sorted(default_packages.split()) output_path.write_text(json.dumps(output, sort_keys=True, separators=(",", ":"))) else: