GNU bug report logs - #49589
[PATCH] import: go: Fix parsing of pkg.go.dev licenses after site update.

Previous Next

Package: guix-patches;

Reported by: Sarah Morgensen <iskarian <at> mgsn.dev>

Date: Fri, 16 Jul 2021 01:43:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49589 in the body.
You can then email your comments to 49589 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#49589; Package guix-patches. (Fri, 16 Jul 2021 01:43:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sarah Morgensen <iskarian <at> mgsn.dev>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 16 Jul 2021 01:43:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sarah Morgensen <iskarian <at> mgsn.dev>
To: guix-patches <at> gnu.org
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





Information forwarded to guix-patches <at> gnu.org:
bug#49589; Package guix-patches. (Sun, 18 Jul 2021 02:16:01 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Sarah Morgensen via Guix-patches via <guix-patches <at> gnu.org>
Cc: Sarah Morgensen <iskarian <at> mgsn.dev>, 49589-done <at> debbugs.gnu.org
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
Hello,

Sarah Morgensen via Guix-patches via <guix-patches <at> 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 sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Sun, 18 Jul 2021 02:16:02 GMT) Full text and rfc822 format available.

Notification sent to Sarah Morgensen <iskarian <at> mgsn.dev>:
bug acknowledged by developer. (Sun, 18 Jul 2021 02:16:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 15 Aug 2021 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 252 days ago.

Previous Next


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