diff mbox series

[bug#51791,1/2] : Update guile-bash

Message ID d57cb1227c8b359403eb0c780f96e416@selfhosted.xyz
State Accepted
Headers show
Series : Update guile-bash | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

david larsson Nov. 12, 2021, 2 p.m. UTC
On 2021-11-12 14:56, david larsson wrote:
> Hi,
> 
> The following 2 patches update the guile-bash source url and
> home-page, and adds a patch for it that does 2 things:
>   - fixes a bug, see below
>   - enables reading newline- or null-separated arguments via stdin to
> guile-bash-defined bash functions.
> 
> The bug is that guile-bash can't read string args with whitespaces in
> it. Example:
> ------------------------
> ~$ enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm
> ~$ scm /tmp/printargs
> ~$ printargs "apa bepa" cepa
> In procedure printargs: scm-function called from Bash with args (apa
> bepa cepa) failed to match signature (file1 file2)
> ~$ cat /tmp/printargs
> (use-modules
>  (gnu bash))
> (define-bash-function (printargs file1 file2)
>     (display file1)
>     (display "\n")
>     (display file2)
>     (display "\n"))
> -------------------------
> 
> After this patch, you can read args "as normal", or via stdin that are
> either newline- or null-separated:
> -------------------------
> ~$ printargs "apa bepa" cepa
> apa bepa
> cepa
> ~$ echo "$apa"
> aba
> aca
> ~$ printf '%s\0' "$apa" bepa | printargs -z
> aba
> aca
> bepa
> ~$ echo "$apa" | printargs
> aba
> aca
> -------------------------
> 
> Best regards,
> David
diff mbox series

Patch

From 413c8f08b0056fe6d08ee7dc08a9279f60c960c7 Mon Sep 17 00:00:00 2001
From: David Larsson <david.larsson@selfhosted.xyz>
Date: Fri, 12 Nov 2021 13:16:58 +0100
Subject: [PATCH 1/2] gnu: guile-bash: Update source url

* gnu/packages/guile-xyz (guile-bash)[homepage]: update to
the new repository.
---
 gnu/packages/guile-xyz.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 56d6d2565d..1d35c41796 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -413,7 +413,7 @@  dictionary and suggesting spelling corrections.")
       (name "guile2.0-bash")
       (version (string-append "0.1.6-" revision "." (string-take commit 7)))
       (home-page
-       "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git")
+       "https://git.sr.ht/~kaction/guile-bash")
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
-- 
2.31.0