From patchwork Tue Jul 11 14:06:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1806353 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=hnmQKP7d; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=terefe.re header.i=@terefe.re header.a=rsa-sha256 header.s=default header.b=XQFxdozI; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4R0jW965f7z20ZZ for ; Wed, 12 Jul 2023 00:12:36 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=0xXU4gTFsUXhXlOvcm68PH35NA/XvRPnE9uO9k5aaAA=; b=hnmQKP7d0W4T1m R1syQlEnBiGp/a3n266MyXwqq6p7U3KUMqXpXjLZ7Uq/6+nZ9UHRr03oqC7pqYXtwCGI8KqY4axqS fGD7N7gp6Np5PnQKwEWcIRYc0C3V797h/GwWROJo2HBFIhGBcGSjT+kFMfoqUg/nb9/4TnBYfj7GM 9qEkA0nagKWZ03vW91uxk+f4tY8u6gttppGCcsGCZboh5ZwUrz6mqTXazchVXFTQIaAd9GC4K7V5V jWHb4VPxIKUVbI01IGpcrvQlcmtqRTYNYvY6XOVRUJgMvBHTs/1WX2ab5j04nGO6AnDa9leFFlRHA Rjp1ixQlWcpYzIwBCh3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qJE3k-00F4h4-2q; Tue, 11 Jul 2023 14:09:44 +0000 Received: from [2a04:52c0:101:a4a::1] (helo=terefe.re) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qJE3g-00F4gD-32 for openwrt-devel@lists.openwrt.org; Tue, 11 Jul 2023 14:09:42 +0000 Received: from localhost.localdomain (unknown [212.106.161.94]) by terefe.re (Postfix) with ESMTPSA id 2C2CA200BB; Tue, 11 Jul 2023 16:09:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=terefe.re; s=default; t=1689084575; bh=ZQdOQWmrNWnQFGfa5IP521xEmhC3nayjmc6DNCtZ0l0=; h=From:To:Cc:Subject:Date:From; b=XQFxdozIeLqoxSd+5xdbV3Tbtj+v9uJiM8EPMRuik9Trsen2V4cIsrZeNC0JDQ0cb Se3q0CePmS77jj+XAf8LylIcJS3kLXSEvir/fAUnAtyFwDgtH1AXyhKI8a5RSAmgLO SM3L/QXcMZ3MHmK8sz3XpHcSky3/M8jsjrUAm7mrzXopc63VOu+o2Kwuxgk/XCyeVP m2lNQzVx+Ja36TXe91KakeSfERhgrS7KOGdtiyOpJGKseZ92KlUO1foRLPnMdnXN9z aOdZMcoNznsxzdk1t8Nv2J11Isp8tH+hRQG0cjHae2oHd7gqowjrTyUvpl+FfDYO1v Bggb292OIDneA== From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Cc: Tomasz Maciej Nowak Subject: [PATCH] ib: split out processing user provided packages Date: Tue, 11 Jul 2023 16:06:21 +0200 Message-ID: <20230711140927.33375-1-tmn505@terefe.re> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230711_070941_413274_546F72E2 X-CRM114-Status: UNSURE ( 7.40 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "bombadil.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: From: Tomasz Maciej Nowak Some device recipes remove default target packages. If user tries to add them back they will be ignored, since packages list is processed in one go. Process the device recipe packages first and do use [...] Content analysis details: (1.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS 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 From: Tomasz Maciej Nowak Some device recipes remove default target packages. If user tries to add them back they will be ignored, since packages list is processed in one go. Process the device recipe packages first and do user ones later, so additions won't get filtered out. Signed-off-by: Tomasz Maciej Nowak --- Test case is simple, download ath79 SDK and invoke: make image PROFILE=ubnt_routerstation PACKAGES=kmod-ath9k The resulting image won't include kmod-ath9k. target/imagebuilder/files/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile index 502037379245..78ec7e2e94a9 100644 --- a/target/imagebuilder/files/Makefile +++ b/target/imagebuilder/files/Makefile @@ -127,9 +127,11 @@ _call_info: FORCE echo 'Available Profiles:' echo; $(PROFILE_LIST) -BUILD_PACKAGES:=$(USER_PACKAGES) $(sort $(DEFAULT_PACKAGES) $($(USER_PROFILE)_PACKAGES) kernel) +BUILD_PACKAGES:=$(sort $(DEFAULT_PACKAGES) $($(USER_PROFILE)_PACKAGES) kernel) # "-pkgname" in the package list means remove "pkgname" from the package list BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(filter -%,$(BUILD_PACKAGES))),$(BUILD_PACKAGES)) +BUILD_PACKAGES:=$(USER_PACKAGES) $(BUILD_PACKAGES) +BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(filter -%,$(BUILD_PACKAGES))),$(BUILD_PACKAGES)) PACKAGES:= _call_image: staging_dir/host/.prereq-build