all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 49589@debbugs.gnu.org
Cc: Sarah Morgensen <iskarian@mgsn.dev>, 49589-done@debbugs.gnu.org
Subject: [bug#49589] [PATCH] import: go: Fix parsing of pkg.go.dev licenses after site update.
Date: Sat, 17 Jul 2021 22:15:05 -0400	[thread overview]
Message-ID: <874kcsl652.fsf@gmail.com> (raw)
In-Reply-To: <52c3bd00c1e919b5e7f8a76b89cb637d3fc2a616.1626399442.git.iskarian@mgsn.dev> (Sarah Morgensen via Guix-patches via's message of "Thu, 15 Jul 2021 18:41:49 -0700")

Hello,

Sarah Morgensen via Guix-patches via <guix-patches@gnu.org> writes:

> * guix/import/go.scm (go-package-licenses): Find license names in
> 'h2 // div // *text*' elements rather than 'h2 // *text*' elements.
> ---
> Hello Guix,
>
> A change to the page formatting on pkg.go.dev has caused Go imports to have
> erroneous license entries:
>
>     (license
>       (list unknown-license!
>             unknown-license!
>             unknown-license!
>             unknown-license!
>             license:expat))))
>
>
> This fixes that.
>
>  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 d8f838f635..f6a68d62bb 100644
> --- a/guix/import/go.scm
> +++ b/guix/import/go.scm
> @@ -146,7 +146,7 @@ name (e.g. \"github.com/golang/protobuf/proto\")."
>           ;; Extract the text contained in a h2 child node of any
>           ;; element marked with a "License" class attribute.
>           (select (sxpath `(// (* (@ (equal? (class "License"))))
> -                              h2 // *text*))))
> +                              h2 // div // *text*))))
>      (select (html->sxml body #:strict? #t))))
>  
>  (define (sxml->texi sxml-node)
>
> base-commit: 01d7e8c2782f61e741f8beff7888adfbdb61779d

LGTM!  Tested and applied as 59d20bcfcc.

Thank you!

Closing.

Maxim




      reply	other threads:[~2021-07-18  2:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16  1:41 [bug#49589] [PATCH] import: go: Fix parsing of pkg.go.dev licenses after site update Sarah Morgensen via Guix-patches via
2021-07-18  2:15 ` Maxim Cournoyer [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=874kcsl652.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=49589-done@debbugs.gnu.org \
    --cc=49589@debbugs.gnu.org \
    --cc=iskarian@mgsn.dev \
    /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.