GNU bug report logs - #51791
[PATCH 0/2]: Update guile-bash

Previous Next

Package: guix-patches;

Reported by: david larsson <david.larsson <at> selfhosted.xyz>

Date: Fri, 12 Nov 2021 13:57:02 UTC

Severity: normal

Tags: patch

Done: david larsson <david.larsson <at> selfhosted.xyz>

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: david larsson <david.larsson <at> selfhosted.xyz>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#51791: closed ([PATCH 0/2]: Update guile-bash)
Date: Wed, 15 Dec 2021 11:56:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 15 Dec 2021 12:55:23 +0100
with message-id <e65d8120df6330d962d8e491b0f2edaf <at> selfhosted.xyz>
and subject line done
has caused the debbugs.gnu.org bug report #51791,
regarding [PATCH 0/2]: Update guile-bash
to be marked as done.

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


-- 
51791: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=51791
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: david larsson <david.larsson <at> selfhosted.xyz>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/2]: Update guile-bash
Date: Fri, 12 Nov 2021 14:56:27 +0100
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


[Message part 3 (message/rfc822, inline)]
From: david larsson <david.larsson <at> selfhosted.xyz>
To: 51791-done <at> debbugs.gnu.org
Subject: done
Date: Wed, 15 Dec 2021 12:55:23 +0100
done


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

Previous Next


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