unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: david larsson <david.larsson@selfhosted.xyz>
To: 51791@debbugs.gnu.org
Cc: Guix-patches <guix-patches-bounces+david.larsson=selfhosted.xyz@gnu.org>
Subject: [bug#51791] [PATCH 1/2]: Update guile-bash
Date: Fri, 12 Nov 2021 15:00:20 +0100	[thread overview]
Message-ID: <d57cb1227c8b359403eb0c780f96e416@selfhosted.xyz> (raw)
In-Reply-To: <cb85c24cfbbe08819ec2ce5381259059@selfhosted.xyz>

[-- Attachment #1: Type: text/plain, Size: 1264 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-guile-bash-Update-source-url.patch --]
[-- Type: text/x-diff; name=0001-gnu-guile-bash-Update-source-url.patch, Size: 997 bytes --]

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


  reply	other threads:[~2021-11-12 14:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-12 13:56 [bug#51791] [PATCH 0/2]: Update guile-bash david larsson
2021-11-12 14:00 ` david larsson [this message]
2021-11-12 14:01 ` [bug#51791] [PATCH 1/2]: " david larsson
2021-11-12 15:50 ` [bug#51791] [PATCH 2/2]: " david larsson
2021-11-26 19:16   ` [bug#51791] [PATCH 2/2 v2]: " david larsson
2021-12-01  7:20 ` [bug#51791] [PATCH 0/2]: " Ricardo Wurmus
2021-12-01 10:28 ` david larsson
2021-12-15 11:54 ` david larsson
2021-12-15 11:55 ` bug#51791: done david larsson

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d57cb1227c8b359403eb0c780f96e416@selfhosted.xyz \
    --to=david.larsson@selfhosted.xyz \
    --cc=51791@debbugs.gnu.org \
    --cc=guix-patches-bounces+david.larsson=selfhosted.xyz@gnu.org \
    /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 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).