* Re: 13/15: gnu: libreoffice: Fix ‘soffice’ in a pure environment.
[not found] ` <20200221173946.F136121233@vcs0.savannah.gnu.org>
@ 2020-02-22 14:14 ` Ludovic Courtès
2020-02-22 18:19 ` Tobias Geerinckx-Rice
0 siblings, 1 reply; 2+ messages in thread
From: Ludovic Courtès @ 2020-02-22 14:14 UTC (permalink / raw)
To: guix-devel, Tobias Geerinckx-Rice
Hi!
guix-commits@gnu.org skribis:
> commit d5f344c987c8cc7b597e938c22e02edf1c4335f3
> Author: Tobias Geerinckx-Rice <me@tobias.gr>
> AuthorDate: Fri Feb 21 05:19:27 2020 +0100
>
> gnu: libreoffice: Fix ‘soffice’ in a pure environment.
>
> * gnu/packages/libreoffice.scm (libreoffice)[arguments]: Refer to grep
> and coreutils by absolute file name in the soffice launcher script.
[...]
> + ;; Use store references for strictly necessary commands,
> + ;; but not for optional tools like ‘gdb’ and ‘valgrind’.
> + (for-each (lambda (command)
> + (substitute* "desktop/scripts/soffice.sh"
> + (((format #f"~a " command))
> + (format #f "~a " (which command)))))
> + (list "dirname" "grep" "uname"))
I strongly encourage using literal strings as patterns, it’s more
robust. In this case, you could replace the ‘for-each’ expression with
something like (untested):
(substitute* "desktop/scripts/soffice.sh"
(("\\<(dirname|grep|uname)\\>" _ cmomand)
(which command)))
WDYT?
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: 13/15: gnu: libreoffice: Fix ‘soffice’ in a pure environment.
2020-02-22 14:14 ` 13/15: gnu: libreoffice: Fix ‘soffice’ in a pure environment Ludovic Courtès
@ 2020-02-22 18:19 ` Tobias Geerinckx-Rice
0 siblings, 0 replies; 2+ messages in thread
From: Tobias Geerinckx-Rice @ 2020-02-22 18:19 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 625 bytes --]
Ludo',
Ludovic Courtès 写道:
> I strongly encourage using literal strings as patterns, it’s
> more
> robust. In this case, you could replace the ‘for-each’
> expression with
> something like (untested):
>
> (substitute* "desktop/scripts/soffice.sh"
> (("\\<(dirname|grep|uname)\\>" _ cmomand)
> (which command)))
>
> WDYT?
Yeah. I use substitute*'s wonderful pattern matching all the
time, probably more than most. I have no idea why it didn't occur
to me here.
I'll push this to staging, libreoffice users have been suffering
enough rebuilds lately.
Thanks!
T G-R
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-22 18:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20200221173940.26669.60790@vcs0.savannah.gnu.org>
[not found] ` <20200221173946.F136121233@vcs0.savannah.gnu.org>
2020-02-22 14:14 ` 13/15: gnu: libreoffice: Fix ‘soffice’ in a pure environment Ludovic Courtès
2020-02-22 18:19 ` Tobias Geerinckx-Rice
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).