From patchwork Fri Aug 21 01:44:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Spooren X-Patchwork-Id: 1348751 X-Patchwork-Delegate: daniel@makrotopia.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=aparcar.org 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=merlin.20170209 header.b=A3ilJXjD; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (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 4BXksL4P2yz9sPB for ; Fri, 21 Aug 2020 11:47:02 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=qLe6fPR2iwRShfFFxM/S+FxyEEbGpLOB5i/dXR2+9gY=; b=A3ilJXjDiGlHcfKT0dOn/jahVH l9FMwZXh8OukxFzU9s1q52Bw82EVEe1WJKygPlk4xQLhQdimOzUgFpX/R2E0pciYN2aAj2GuA1OQh NCUGBy4u0ZOcs0sDFbed4IS6VrOCHUcMym/utJiUidID7gHVH9ZizZJ5NjT8x81HYw7UdwSSUTRgG YkXWYpCNGRDoIWcMEteVEogAh9Ib+VhfGNwu64LmYDCh2Whm4vHVRDDAWXp3PQ/3FDR4o3u13TJjy TYXLiaIfvzIDmrUGSkl1fKKylk9i1HsBKpNUK2t8CykCU23SE8UOscrReQgi64TBFODRBbxSXW+x5 JfQLGtiQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8w74-00087n-Nm; Fri, 21 Aug 2020 01:45:02 +0000 Received: from relay11.mail.gandi.net ([217.70.178.231]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8w71-00086j-I9 for openwrt-devel@lists.openwrt.org; Fri, 21 Aug 2020 01:45:00 +0000 Received: from dawn.lan (udp224251uds.hawaiiantel.net [72.234.141.215]) (Authenticated sender: mail@aparcar.org) by relay11.mail.gandi.net (Postfix) with ESMTPA id 43D56100002; Fri, 21 Aug 2020 01:44:54 +0000 (UTC) From: Paul Spooren To: openwrt-devel@lists.openwrt.org Subject: [PATCH] build: add whatdepends target to imagebuilder Date: Thu, 20 Aug 2020 15:44:51 -1000 Message-Id: <20200821014451.375982-1-mail@aparcar.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200820_214459_717070_24705571 X-CRM114-Status: GOOD ( 11.42 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.178.231 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [217.70.178.231 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Spooren Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The package manager `opkg` offers the function `whatdepends` to print packages that depend on a specific package. This feature is useful when used in a CI to not only build an upgraded package but all packages with a dependency. Usage: make whatdepends PACKAGE=libipset The resulting list can be fed into a SDK building all packages and warn if anything fails. Signed-off-by: Paul Spooren --- I'm currently running a CI which determines affected areas as first step, an example is here where the `fstools` packages was modified: https://gitlab.com/aparcar/openwrt/-/jobs/696713593#L48 With the whatdepends extension it would be possible to figure out all affected packages. target/imagebuilder/files/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile index 326dd2ba2f..27d3cfa8df 100644 --- a/target/imagebuilder/files/Makefile +++ b/target/imagebuilder/files/Makefile @@ -220,4 +220,12 @@ manifest: FORCE $(if $(PROFILE),USER_PROFILE="$(PROFILE_FILTER)") \ $(if $(PACKAGES),USER_PACKAGES="$(PACKAGES)")) -.SILENT: help info image manifest +whatdepends: FORCE +ifeq ($(PACKAGE),) + @echo 'Variable `PACKAGE` is not set but required by `whatdepends`' + @exit 1 +endif + @$(MAKE) -s package_reload + @$(OPKG) whatdepends -A $(PACKAGE) + +.SILENT: help info image manifest whatdepends