From patchwork Tue Jun 8 19:48:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 1489614 X-Patchwork-Delegate: hauke@hauke-m.de 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=2607:7c80:54:e::133; helo=bombadil.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=bombadil.20210309 header.b=ODJZ4yWn; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=hauke-m.de header.i=@hauke-m.de header.a=rsa-sha256 header.s=MBO0001 header.b=NWlG0F7a; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 4G017z3MlMz9sWQ for ; Wed, 9 Jun 2021 05:51:11 +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=V6GXDITdZTbexiFnI6AS2jgzYaJ9csay7paCk2dKduA=; b=ODJZ4yWnnz2yLM eDQutD8qT5avfOl4rHXGtHPZ5cgOEArAk+vUUZdOUMsN7l8mb+4jwn/pFnkFuV33MvgLULSkkk9Cx btF+J9pNzlsk7b6yi3H+acXzteXK4zyFGxyH7jl+MYME7oIt69hg6Fb93fTVdMNeUOJPABoe+jM+/ ZocAq/ZmPN7xrWUQp4WEDPy73A3aOSw/HDsbzRyKR/6dEbF7IIcKna+hEwQHILBWdHi4luGoUvFM7 Wtgn59wOQO/UbettbrPzsSFdC4xXSHfEFTof/vmpzNi+OafWSfc7FkaYRcZdF3cRLhL/hMTocfWNJ DmFLXJeSXSWA7Vp6jn6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqhij-00AGtG-Qp; Tue, 08 Jun 2021 19:49:05 +0000 Received: from mout-p-102.mailbox.org ([80.241.56.152]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqhid-00AGrB-TO for openwrt-devel@lists.openwrt.org; Tue, 08 Jun 2021 19:49:04 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4G015L0qgjzQk2T; Tue, 8 Jun 2021 21:48:54 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hauke-m.de; s=MBO0001; t=1623181732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=bTYwurzH1U8Y9Dc8hRsPXU9l3mLJHzdrEVzTFdEvTl0=; b=NWlG0F7a18mAtb1LSsi8SvpkL+1i4m64qiSpbdSYMOIcX6oqfdkMlhGIfVWs0+1dJZ44l5 bzZlYZR7KIL+qlvOC232MQluss3Ps31BSSt5X8lrSkGvS4m1s0xXi2SZ56UDK/fL+7obAj R7RQ74cWfxsrc81T/+fVfPTGR1a7jESkEjeK2pW/QvXs+1d/cfDyIVBHwOZ9ymJZCGJ08b hiv3CJU0EqRloDUKAWvfl76yDNGzu6341aEBazbxyTofO2cN+XR3izvo+3pxcnTsbKlplf pRA3cnUBbXPY43h/o4MD3ZT+BnrVTluBSZWJtMxC9E/ZwFQnHVgTyrENNb3Qxg== Received: from smtp2.mailbox.org ([80.241.60.241]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id vryTO6uUdPnh; Tue, 8 Jun 2021 21:48:50 +0200 (CEST) From: Hauke Mehrtens To: openwrt-devel@lists.openwrt.org Cc: jo@mein.io, daniel@makrotopia.org, baptiste@bitsofnetworks.org, devel-sven@geroedel.de, Hauke Mehrtens Subject: [PATCH v2] libopkg: pkg_hash: print unresolved dependencies Date: Tue, 8 Jun 2021 21:48:40 +0200 Message-Id: <20210608194840.470214-1-hauke@hauke-m.de> MIME-Version: 1.0 X-MBO-SPAM-Probability: *** X-Rspamd-Score: 3.48 / 15.00 / 15.00 X-Rspamd-Queue-Id: EFD52180C X-Rspamd-UID: f6ddcf X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210608_124900_444532_C5736F00 X-CRM114-Status: GOOD ( 11.90 ) X-Spam-Score: -0.9 (/) 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: When a package is not installed because it has unresolved dependencies normally we get only an error message like this: * pkg_hash_fetch_best_installation_candidate: Packages for ltq-vdsl-app found, b [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.152 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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 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 When a package is not installed because it has unresolved dependencies normally we get only an error message like this: * pkg_hash_fetch_best_installation_candidate: Packages for ltq-vdsl-app found, but incompatible with the architectures configured * opkg_install_cmd: Cannot install package ltq-vdsl-app. Log in addition the following error message: * pkg_hash_check_unresolved: cannot find dependency ltq-dsl-base for ltq-vdsl-app Signed-off-by: Hauke Mehrtens --- I am not sure if this would happen in normal cases too and spam the error log, I only saw this in an error case. Could some expert on opkg please give me an Acked-by or some suggestion to improve this. I would also like to merge this into 21.02. Changes since v1: * can not -> cannot libopkg/pkg_hash.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c index a07a25e..c58703f 100644 --- a/libopkg/pkg_hash.c +++ b/libopkg/pkg_hash.c @@ -263,8 +263,10 @@ pkg_hash_check_unresolved(pkg_t *maybe) if (unresolved) { res = 1; tmp = unresolved; - while (*tmp) + while (*tmp) { + opkg_msg(ERROR, "cannot find dependency %s for %s\n", *tmp, maybe->name); free(*(tmp++)); + } free(unresolved); } pkg_vec_free(depends);