GNU bug report logs - #49934
Hw-Probe

Previous Next

Package: guix-patches;

Reported by: phodina <phodina <at> protonmail.com>

Date: Sat, 7 Aug 2021 22:00:01 UTC

Severity: normal

Tags: patch

Merged with 50283

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#50283: closed (HwInfo)
Date: Thu, 23 Jun 2022 15:36:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 23 Jun 2022 11:35:04 -0400
with message-id <878rpn4clz.fsf_-_ <at> gmail.com>
and subject line Re: bug#50283: HwInfo
has caused the debbugs.gnu.org bug report #49934,
regarding HwInfo
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
49934: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=49934
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Raghav Gururajan <rg <at> raghavgururajan.name>
To: guix-patches <at> gnu.org
Subject: HwInfo
Date: Mon, 30 Aug 2021 15:31:06 -0400
[Message part 3 (text/plain, inline)]

[OpenPGP_0x5F5816647F8BE551.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]
[Message part 6 (message/rfc822, inline)]
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Raghav Gururajan <rg <at> raghavgururajan.name>
Cc: Ricardo Wurmus <rekado <at> elephly.net>, 49934-done <at> debbugs.gnu.org,
 50283-done <at> debbugs.gnu.org
Subject: Re: bug#50283: HwInfo
Date: Thu, 23 Jun 2022 11:35:04 -0400
Hi,

Raghav Gururajan <rg <at> raghavgururajan.name> writes:

> Hi Ricardo!
>
>> --8<---------------cut here---------------start------------->8---
>> (substitute* "hw-probe.pl"
>>    (("Cmd\\(\"([^\"]+)" _ command)
>>     (string-append "Cmd(\"" (which command))))
>> --8<---------------cut here---------------end--------------->8---
>
> Thanks for the snippet and explanation.
>
> I am wondering these,
> [1] Does require import of specific modules?

No.  `which', the Scheme procedure, is part of (guix build utils).

> [2] If `(which command)`'s output is empty, will it return #f?

Yes, and I agree that's a problem.

Fortunately, the recently added search-input-file more usefully raises
an error when the file it is looking for doesn't exist, so I used that.

It was a bit painful to hunt all the commands but in the end it works
beautifully!  I pushed the result as
3611f99affc4d2edcf4141e3022dd0d2a0b04068.

Closing, thanks!

Maxim


This bug report was last modified 3 years and 27 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.