emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#49589: closed ([PATCH] import: go: Fix parsing of pkg.go.dev license


From: GNU bug Tracking System
Subject: bug#49589: closed ([PATCH] import: go: Fix parsing of pkg.go.dev licenses after site update.)
Date: Sun, 18 Jul 2021 02:16:02 +0000

Your message dated Sat, 17 Jul 2021 22:15:05 -0400
with message-id <874kcsl652.fsf@gmail.com>
and subject line Re: [bug#49589] [PATCH] import: go: Fix parsing of pkg.go.dev 
licenses after site update.
has caused the debbugs.gnu.org bug report #49589,
regarding [PATCH] import: go: Fix parsing of pkg.go.dev licenses after site 
update.
to be marked as done.

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


-- 
49589: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=49589
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] import: go: Fix parsing of pkg.go.dev licenses after site update. Date: Thu, 15 Jul 2021 18:41:49 -0700
* 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:

--8<---------------cut here---------------start------------->8---
    (license
      (list unknown-license!
            unknown-license!
            unknown-license!
            unknown-license!
            license:expat))))
--8<---------------cut here---------------end--------------->8---

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
-- 
2.31.1




--- End Message ---
--- Begin Message --- Subject: Re: [bug#49589] [PATCH] import: go: Fix parsing of pkg.go.dev licenses after site update. Date: Sat, 17 Jul 2021 22:15:05 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
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


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]