GNU bug report logs - #67822
[PATCH] gnu: maths: petsc: Reduce closure size.

Previous Next

Package: guix-patches;

Reported by: Lars Bilke <lars.bilke <at> ufz.de>

Date: Thu, 14 Dec 2023 12:57:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 67822 <at> debbugs.gnu.org, Andreas Enge <andreas <at> enge.fr>, Lars Bilke <lars.bilke <at> ufz.de>, Eric Bavier <bavier <at> posteo.net>
Subject: [bug#67822] [PATCH v3] gnu: maths: petsc: Reduce closure size.
Date: Mon, 08 Jan 2024 18:20:07 +0100
Hi,

Efraim Flashner <efraim <at> flashner.co.il> skribis:

> On Fri, Jan 05, 2024 at 12:52:02PM +0100, Lars Bilke wrote:
>> Hi Ludo,
>> 
>> On 5 Jan 2024, at 12:08, Ludovic Courtès wrote:
>> 
>> > Can we instead patch the thing that creates ‘petscvariables’ in the
>> > first place?
>> >
>> > The reason I’m suggesting it is because in general we avoid hardcoding
>> > /gnu/store in substitution patterns because it’s possible to configure
>> > Guix with a different store directory.
>> 
>> Thanks for your feedback!
>> 
>> In v1 of this patch I removed the 'petscvariables'-file completely but this broke dependent packages as well as not-yet packaged projects which use the file for finding the PETSc library and configuriung their build system.
>> 
>> Is there a possibility to replace the hard-coded /gnu/store with a variable which evaluates to the current store directory?
>
> There's %store-directory in (guix build utils).  In fact, it looks like
> git might have some code that you can borrow.

Yes.  However, I think we should use literal strings for patterns in
‘substitute*’.  That is, I would avoid:

  (substitute* …
    (((string-append (%store-directory) "/bin/whatever"))
     …))

in favor of, say:

  (substitute* …
    (("([[:graph:]]+)/bin/whatever")
      …))

This is to make things easier to understand, 100% correct (in theory we
should use ‘regexp-quote’ when turning strings into regexps), and to
leave room for how ‘substitute*’ is implemented.

Thanks,
Ludo’.




This bug report was last modified 1 year and 168 days ago.

Previous Next


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