From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id +JaeNs3WumFlNgEAgWs5BA (envelope-from ) for ; Thu, 16 Dec 2021 07:03:57 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id wJ9AMs3WumFGRwAAbx9fmQ (envelope-from ) for ; Thu, 16 Dec 2021 06:03:57 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A40F2352D5 for ; Thu, 16 Dec 2021 07:03:57 +0100 (CET) Received: from localhost ([::1]:52704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxjrw-0001YQ-ON for larch@yhetil.org; Thu, 16 Dec 2021 01:03:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxjq6-00088c-0x for guix-patches@gnu.org; Thu, 16 Dec 2021 01:02:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:50966) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxjq5-0002fL-Nf for guix-patches@gnu.org; Thu, 16 Dec 2021 01:02:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mxjq5-0005mq-LV for guix-patches@gnu.org; Thu, 16 Dec 2021 01:02:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#49934] Hw-Probe References: In-Reply-To: Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 16 Dec 2021 06:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49934 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49934@debbugs.gnu.org Cc: Raghav Gururajan Received: via spool by 49934-submit@debbugs.gnu.org id=B49934.163963447622143 (code B ref 49934); Thu, 16 Dec 2021 06:02:01 +0000 Received: (at 49934) by debbugs.gnu.org; 16 Dec 2021 06:01:16 +0000 Received: from localhost ([127.0.0.1]:34279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxjpL-0005l5-UZ for submit@debbugs.gnu.org; Thu, 16 Dec 2021 01:01:16 -0500 Received: from sender3-of-o52.zoho.com ([136.143.184.52]:21831) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxjpF-0005kj-Q0 for 49934@debbugs.gnu.org; Thu, 16 Dec 2021 01:01:14 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1639634467; cv=none; d=zohomail.com; s=zohoarc; b=WmJH9LSc8a1YVibivEktV/q8q2c0+CI9Du14dFN/wok25AfDyvTcPCYfVJCr8juKuawRhL6T2qST+Nz0Y1e2O438+WErWUdVyKh8EcyGIblyDou5kRewX+802LAlR8JRVQdja6yAXnGKkAfry5vWV5D3CJlba6MVaSOwt8yn5/M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639634467; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=A1RwcHe7KGKWGKeV3hv2u+IREDzAND26IASdhHxdel4=; b=ZRTti2uihINSjyXAo8vjxcBJ3r5sFYs4fYO2pDKrmGIXuz2VjsLqp9dsZfu6kZiN1ZbmAL+f6sHsl2Ihasur3Idvxivhkfvu7Ne9EfcitxSOGnYQvGpdjlkPCxTrmuQMT7Ur0cRGve7MYZxgY6Yst//4GSm9H+w51ull64y0qqY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1639634467; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=A1RwcHe7KGKWGKeV3hv2u+IREDzAND26IASdhHxdel4=; b=f5LJZJFrqURMKrlwqxtFqwHEkrjLkGxSQxjfgUucYqBoY8fYAhugMgmIatubVz4f 2Y2J81JCWX7tBFRud34sMBp9do9Yv5W0/3B0AkdfUoLokeRlUdVQFKP5DB7FWFMQUFG Q98sdpO1G4JIRStN3K165QlhbbYPrRwYkgU8XuLg= Received: from localhost (p54ad4c3a.dip0.t-ipconnect.de [84.173.76.58]) by mx.zohomail.com with SMTPS id 1639634466895430.8922175497937; Wed, 15 Dec 2021 22:01:06 -0800 (PST) User-agent: mu4e 1.6.10; emacs 28.0.50 From: Ricardo Wurmus Date: Thu, 16 Dec 2021 06:53:22 +0100 X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Message-ID: <87bl1hks0w.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1639634637; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=A1RwcHe7KGKWGKeV3hv2u+IREDzAND26IASdhHxdel4=; b=nGpDyFkq0YFTOtg+pYK/MiWGU203ImCP7XK4H4tk7X3JDo75H7n1Kn5AkUPwK9KeP6SHTE sr4kqIpXU696vLU6nmjNHZQySf4boEBP80q3Axd3yIbMEjBR4/FrOzrngeJsGCIJGad3mb nGsOHB4dwlOuNsFM0+wSWTNgQtt6NCcbacgMYsvkBuUJlPY2ks40jimLoYRSSokCPzWE94 dUomDuYfnA4sLHiwc2SS239mfu1fZ0/OwJBEoYwj059t9q8Eqhxbt461wBtWfD3BGLV6Fm STYIwnDKzUvjBeKnYoWryRedb0m3P6ig4EnIcwmTfchFJWPMKtet0Xks/1xKAg== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1639634637; a=rsa-sha256; cv=fail; b=SIYmg+wewEkzKBmmM1mGWzid5bFhHs+ETT4Ns+1fgwNfePQ+qJwhEU0M12xrlbH5tmGI6S GsWzpjea9mGy3OpxE07GIc+aq1Jpu8K2brilKOXEYHv5KIt1/DMgDmhaczeVajkOgI3Mlt mIFb6u7ZFnV9uo6rv9wVR58Yzc0/Z+x0UGPhKg4N3lQz1SuKMQirMKqJmnmx1ubW1rsPmL SE8a44sWNXExAdTflX6rQUNNT/Z/qGy7cDIvCJCMumqtG64in6YhGDQTFPx8lO1G6TAcdz JVul3KYcot4ivMBMB/rEeq4zUxUy5exvoJpY7I3L40CerTU+/JZoaaUL3VmAqg== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=elephly.net header.s=zoho header.b=f5LJZJFr; arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.09 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=elephly.net header.s=zoho header.b=f5LJZJFr; arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A40F2352D5 X-Spam-Score: -3.09 X-Migadu-Scanner: scn0.migadu.com X-TUID: m1a0CfNcmOKv Thanks for the patch! I=E2=80=99m afraid the 'patch build phase is much too repetitive. You can greatly simplify it by doing a substitution like this: --8<---------------cut here---------------start------------->8--- (substitute* "hw-probe.pl" (("Cmd\\(\"([^\"]+)" _ command) (string-append "Cmd(\"" (which command)))) --8<---------------cut here---------------end--------------->8--- The regular expression has a sub-group that matches everything after the opening double quote until it hits another double quote. That group is captured as =E2=80=9Ccommand=E2=80=9D. We then look up that string in the = build environment with =E2=80=9Cwhich=E2=80=9D (not the executable of the same na= me), which returns the absolute file name corresponding to the command. --=20 Ricardo