unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Sarah Morgensen <iskarian@mgsn.dev>
To: 50884@debbugs.gnu.org
Subject: [bug#50884] [PATCH] import: go: Handle extra whitespace in "go-import" meta tags.
Date: Tue, 28 Sep 2021 19:49:58 -0700	[thread overview]
Message-ID: <a17a80cb6c49792d27f09817e484461bb190c9d3.1632883770.git.iskarian@mgsn.dev> (raw)

Some packages sites use extra whitespace in the content portion of <meta
name="go-import" ...> tags, so handle that.  Example:
<https://k8s.io/api?go-get=1>

* guix/import/go.scm (fetch-module-meta-data)[go-import->module-meta]:
Use 'string-tokenize' instead of 'string-split'.
---
 guix/import/go.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/import/go.scm b/guix/import/go.scm
index 9769b557ae..ca909ab35a 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -474,7 +474,7 @@ Optionally include a VERSION string to append to the name."
 because goproxy servers don't currently provide all the information needed to
 build a package."
   (define (go-import->module-meta content-text)
-    (match (string-split content-text #\space)
+    (match (string-tokenize content-text char-set:graphic)
       ((root-path vcs repo-url)
        (make-module-meta root-path (string->symbol vcs)
                          (strip-.git-suffix/maybe repo-url)))))

base-commit: c582be4c38596a6a31a39c6799723dcd8b6eb909
-- 
2.33.0





             reply	other threads:[~2021-09-29  2:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29  2:49 Sarah Morgensen [this message]
2021-10-04 14:07 ` bug#50884: [PATCH] import: go: Handle extra whitespace in "go-import" meta tags Ludovic Courtès

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=a17a80cb6c49792d27f09817e484461bb190c9d3.1632883770.git.iskarian@mgsn.dev \
    --to=iskarian@mgsn.dev \
    --cc=50884@debbugs.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).