From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id qLltHJ8VcWLXagAAbAwnHQ (envelope-from ) for ; Tue, 03 May 2022 13:44:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 0IlmHJ8VcWLTFwAAauVa8A (envelope-from ) for ; Tue, 03 May 2022 13:44:31 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E6B101F10F for ; Tue, 3 May 2022 13:44:30 +0200 (CEST) Received: from localhost ([::1]:45608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlqxB-0003eA-Hy for larch@yhetil.org; Tue, 03 May 2022 07:44:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlqwk-0003dC-Ng for guix-patches@gnu.org; Tue, 03 May 2022 07:44:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44940) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlqwk-0002RD-DO for guix-patches@gnu.org; Tue, 03 May 2022 07:44:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nlqwk-0005Pq-Bg for guix-patches@gnu.org; Tue, 03 May 2022 07:44:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55242] [PATCH 02/10] guix: import: go: Rename go.pkg.dev-info to pkg.go.dev-info. References: <20220503111620.3139-1-attila@lendvai.name> In-Reply-To: <20220503111620.3139-1-attila@lendvai.name> Resent-From: Attila Lendvai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 03 May 2022 11:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55242 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55242@debbugs.gnu.org Cc: Attila Lendvai Received: via spool by 55242-submit@debbugs.gnu.org id=B55242.165157821020687 (code B ref 55242); Tue, 03 May 2022 11:44:02 +0000 Received: (at 55242) by debbugs.gnu.org; 3 May 2022 11:43:30 +0000 Received: from localhost ([127.0.0.1]:38815 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlqwE-0005NZ-Ch for submit@debbugs.gnu.org; Tue, 03 May 2022 07:43:30 -0400 Received: from mail-ed1-f48.google.com ([209.85.208.48]:42843) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlqwB-0005N3-Lc for 55242@debbugs.gnu.org; Tue, 03 May 2022 07:43:28 -0400 Received: by mail-ed1-f48.google.com with SMTP id z19so19494210edx.9 for <55242@debbugs.gnu.org>; Tue, 03 May 2022 04:43:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0EaRwqltx74K+c88sp3dmDjNsW9WweZYaKkVLmJrrW4=; b=orYLiFZdh+iZfTVRl84FOWB5McxY83Y5/H/LdojRJPpM3HE/NikzefKISFVzYEkICP /YpUNxgxh8bWJV/SRJrsVOjvXLYCZYktCbaZwzRHk1ct0pBqZgdCGpzH+rpi4cSsJnHw /43yW94MtR+dOXfQn6r8Dt0s2AuBXAcZ5N+m7HFy9zmiC5iN76mQ15Qly6zSZSyP34P6 p7uR02nWz3WZdDfoKCT5ItDO6mFx6h10+swqHs0DnrN7d4k6epRwnUY0T4ynF776MEzW 69V8KlO2QOucSZGaPS5XdMg+AKkiFlI+dnVWaIm2tclAo56pD2pO7+byICpZO2d2lVZO x1NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=0EaRwqltx74K+c88sp3dmDjNsW9WweZYaKkVLmJrrW4=; b=IP6bxWBo9g4IFRF7v0gHQi5xbi3l65VMGfz0VPVnhcVkDSYpF7C7cXQ2XHwHj/Zm7R C0B/GuBpeKu6E8Qb6CX1zwz6AkrSS8xXhdf2hNbrEbBOvYA5i+F5kvsKsNFsgc2Q8uae Q0juYhKmQfO59oVLnhBg8iLNF7AxegFNgatcFDMEgJGJf7pSOevHmnmhIm9Me+iif/E3 kE/lE7JV1W6L8+ojUkIuvKFuSVPbSDQY9aVxLLdBtCm3nUdRytG91ImFppbexjWHA8n8 v/H+jcLpgAMz0nJo1y13jX3GySJl5iTtfNK4TR1Kjx08Y1+PxlEEUVT3UIpxmagRGAd2 XvZA== X-Gm-Message-State: AOAM5301/Hm4E5oo6f13WuXsAHQqbM+Ti17bqyfaKiYPYFG+oSp56qON 5JQHbVLO1TmBXeOhmKO3ts1RbGd07A0= X-Google-Smtp-Source: ABdhPJyF019NFblk2hic2vsFhwlOHyhy4Qq7jZyCjz96xo4tvymMgRihoaC6DWNAF37YeKVZC6TJDQ== X-Received: by 2002:aa7:d549:0:b0:425:fc06:60d4 with SMTP id u9-20020aa7d549000000b00425fc0660d4mr17902490edr.300.1651578201541; Tue, 03 May 2022 04:43:21 -0700 (PDT) Received: from lelap.local (catv-89-132-245-188.catv.fixed.vodafone.hu. [89.132.245.188]) by smtp.gmail.com with ESMTPSA id k13-20020a05640212cd00b0042617ba63d6sm7766964edx.96.2022.05.03.04.43.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 May 2022 04:43:21 -0700 (PDT) From: Attila Lendvai Date: Tue, 3 May 2022 13:42:53 +0200 Message-Id: <20220503114301.9524-2-attila@lendvai.name> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1651578271; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=0EaRwqltx74K+c88sp3dmDjNsW9WweZYaKkVLmJrrW4=; b=eeebpRUVy4L3l8ih+saZbjBMcw/o+C6oEeef8jDFsZJ5qVmlQm3ns5hC9G82OcSruF5JC9 1fxKd3km6RYeppmPukFXBrdzrk7UxUjGfC4rEKfynYReBNQ2W+MBsz1o67TkKJIBnrJxIS 3WrhhDe9Y58DPjkZnmlcxMdNTidv9J7a6oY/E812WCdCwa1gmq6tG9XuA4s8pUWmmxqmOs lr5/MO6MiINd++oWrlliOoQLwactfUd1CfEasY4RA7FYRxNQeeGmZ0gOpsY14jo6LjzgLh p+9hrcrNxhlCkSHrOAaQHwezp2CKA3cpQ8rZecgegz1I5Ouwzox7wiyN5q9yBQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651578271; a=rsa-sha256; cv=none; b=GdySTMwCjJsrLAPye9qXSMLt2rR2+9RjCyhNW8cSGklLhUqMNmBljufrgyw9dceMhlJn2+ tNJs0c/q13hPCQwUb89gNQkAqJ4czB4YwtRbLhthowr3j4xmQJ3gqOfwrUrFnNf5XLwo0r Q7UGUTWate9pbyPIBWmJfTwJspLsxRhN481RoTI8W3TzdZUSlwcTD9DbuZwFCtwGScLq71 8EVMUbXpdgGXYM7MX/FU6h5FBUImiJesXaLaC/TPOlwzJCo+iZh4yK7THGf8hCUYWYptRU i+rHn/PEwylnlJNUnHxR0pkzKq87rAIhgQJ89Wt1mXg+qJlCp1XWqJbytTrewQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=orYLiFZd; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 1.52 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=orYLiFZd; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: E6B101F10F X-Spam-Score: 1.52 X-Migadu-Scanner: scn0.migadu.com X-TUID: B/riLTH0N/k0 To properly mimic the name of the website. Also employ it at one more place. --- guix/import/go.scm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/guix/import/go.scm b/guix/import/go.scm index d00c13475a..bb4bb7bb7b 100644 --- a/guix/import/go.scm +++ b/guix/import/go.scm @@ -120,8 +120,11 @@ (define (escape occurrence) ;; Prevent inlining of this procedure, which is accessed by unit tests. (set! go-path-escape go-path-escape) -(define (go.pkg.dev-info name) - (http-fetch* (string-append "https://pkg.go.dev/" name))) +(define (pkg.go.dev-info module-path) + ;; FIXME if MODULE-PATH is a fork on github, then it will try to get the + ;; info of the fork (instead of the upstream), which most probably does not + ;; exist in pkg.go.dev. Example: https://github.com/bonitoo-io/oapi-codegen + (http-fetch* (string-append "https://pkg.go.dev/" module-path))) (define* (go-module-version-string goproxy name #:key version) "Fetch the version string of the latest version for NAME from the given @@ -147,7 +150,7 @@ (define* (go-module-available-versions goproxy name) (define (go-package-licenses name) "Retrieve the list of licenses that apply to NAME, a Go package or module name (e.g. \"github.com/golang/protobuf/proto\")." - (let* ((body (go.pkg.dev-info (string-append name "?tab=licenses"))) + (let* ((body (pkg.go.dev-info (string-append name "?tab=licenses"))) ;; Extract the text contained in a h2 child node of any ;; element marked with a "License" class attribute. (select (sxpath `(// (* (@ (equal? (class "License")))) @@ -169,7 +172,7 @@ (define (sxml->texi sxml-node) (define (go-package-description name) "Retrieve a short description for NAME, a Go package name, e.g. \"google.golang.org/protobuf/proto\"." - (let* ((body (go.pkg.dev-info name)) + (let* ((body (pkg.go.dev-info name)) (sxml (html->sxml body #:strict? #t)) (overview ((sxpath `(// @@ -206,8 +209,7 @@ (define (go-package-synopsis module-name) the https://pkg.go.dev/ web site." ;; Note: Only the *module* (rather than package) page has the README title ;; used as a synopsis on the https://pkg.go.dev web site. - (let* ((url (string-append "https://pkg.go.dev/" module-name)) - (body (http-fetch* url)) + (let* ((body (pkg.go.dev-info module-name)) ;; Extract the text contained in a h2 child node of any ;; element marked with a "License" class attribute. (select-title (sxpath -- 2.35.1