From: ludo@gnu.org (Ludovic Courtès)
To: Tobias Geerinckx-Rice <me@tobias.gr>
Cc: 27675@debbugs.gnu.org
Subject: [bug#27675] [PATCH] gnu: kbd: Recursively search $LOADKEYS_KEYMAP_PATH.
Date: Mon, 17 Jul 2017 17:46:21 +0200 [thread overview]
Message-ID: <87d18z5anm.fsf@gnu.org> (raw)
In-Reply-To: <1a1b4745-31a4-f32c-ed46-cb7640591aae@tobias.gr> (Tobias Geerinckx-Rice's message of "Mon, 17 Jul 2017 13:43:47 +0200")
Hello,
Tobias Geerinckx-Rice <me@tobias.gr> skribis:
> On 17/07/17 13:00, Ludovic Courtès wrote:
>> I mean, it works because it turns out that we pass those ** to Bash,
>> which does the right thing.
>
> But that's not true:
>
> /* Search a list of directories and directory hierarchies */
> for (i = 0; dirpath[i]; i++) {
> recdepth = 0;
> dl = strlen(dirpath[i]);
>
> /* trailing stars denote recursion */
> while (dl && dirpath[i][dl - 1] == '*')
> dl--, recdepth++;
>
> (src/libkeymap/findfile.c:269).
Ah OK, if that’s a libkeymap thing, that’s better (I should know Bash
better!).
>> However, a search-path specification is supposed to be
>> understandable internally by ‘evaluate-search-paths’
>
> Erk. So you're saying Guix tries to do clever things (beyond separator
> concatenation) to search-paths before exporting them? That won't work.
> If that is the case, we'll have to use something other than search-paths
> for kbd (and any packages that interpret things like ‘*’ themselves,
> without a shell).
>
> But again, at least in the installer image, LOADKEYS_KEYMAP_PATH is
> properly untouched as far as I've tested.
Yes, that’s OK.
What I meant is that search-path-specifications have clear semantics
that are interpreted by ‘evaluate-search-paths’. In this case, what
happens is this:
--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> ,use(guix search-paths)
scheme@(guile-user)> (search-path-specification
(variable "LOADKEYS_KEYMAP_PATH")
;; Append ‘/**’ to recursively search all directories. One can then
;; run (for example) ‘loadkeys en-latin9’ instead of having to find
;; and type ‘i386/colemak/en-latin9’ on a mislabelled keyboard.
(files (list "share/keymaps/**")))
$4 = #<<search-path-specification> variable: "LOADKEYS_KEYMAP_PATH" files: ("share/keymaps/**") separator: ":" file-type: directory file-pattern: #f>
scheme@(guile-user)> (evaluate-search-paths (list $4) (list "/run/current-system/profile"))
--8<---------------cut here---------------end--------------->8---
AFAICS, /run/current-system/profile/etc/profile does not include a
LOADKEYS_KEYMAP_PATH definition because of that. Or am I missing
something?
Thank you,
Ludo’.
prev parent reply other threads:[~2017-07-17 15:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-13 0:34 [bug#27675] [PATCH] gnu: kbd: Recursively search $LOADKEYS_KEYMAP_PATH Tobias Geerinckx-Rice
2017-07-13 0:41 ` Tobias Geerinckx-Rice
2017-07-13 7:41 ` ng0
2017-07-14 8:39 ` bug#27675: " Tobias Geerinckx-Rice
2017-07-17 9:20 ` [bug#27675] " Ludovic Courtès
2017-07-17 9:35 ` Tobias Geerinckx-Rice
2017-07-17 11:00 ` Ludovic Courtès
2017-07-17 11:54 ` Tobias Geerinckx-Rice
[not found] ` <1a1b4745-31a4-f32c-ed46-cb7640591aae@tobias.gr>
2017-07-17 15:46 ` Ludovic Courtès [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d18z5anm.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=27675@debbugs.gnu.org \
--cc=me@tobias.gr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.