From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 16 23:08:02 2021 Received: (at 50595) by debbugs.gnu.org; 17 Sep 2021 03:08:03 +0000 Received: from localhost ([127.0.0.1]:58149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mR4EM-0001w0-Ie for submit@debbugs.gnu.org; Thu, 16 Sep 2021 23:08:02 -0400 Received: from out1.migadu.com ([91.121.223.63]:18822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mR4EK-0001vb-2s for 50595@debbugs.gnu.org; Thu, 16 Sep 2021 23:08:01 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1631848079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DOYTcbTlzObcu3MiQlT76bXrVWjqpSJSWDNwcSYZkG8=; b=Gaqd5wvtk0lk7mcmUPPVwGA+7I4O38wx82wR6wAeCVsYg20ezCzbCpwpBY2xBTSXrWyKmF w9sZNoEcT6D+Snh9CAaPuYmey+tAlqZrsq7nO3/yC4bvJsZdvFPVf7yvEZctmDbkpNDejC 9lG8rVqqoyI4wsdiemmtxXe6a2oOR7A= From: Sarah Morgensen To: Stephen Paul Weber Subject: Re: bug#50595: Faliure in guix import go References: <20210915003242.GA22238@singpolyma-beefy.lan> Date: Thu, 16 Sep 2021 20:07:52 -0700 In-Reply-To: <20210915003242.GA22238@singpolyma-beefy.lan> (Stephen Paul Weber's message of "Tue, 14 Sep 2021 19:32:42 -0500 (2 days, 59 minutes, 30 seconds ago)") Message-ID: <861r5nj3w7.fsf@mgsn.dev> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50595 Cc: 50595@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain Hello, Thanks for your report! Stephen Paul Weber writes: > $ guix import go -r bdd.fi/x/runitor > > guix import: warning: Failed to import package "bdd.fi/x/runitor". > reason: ("struct-vtable" "Wrong type argument in position 1 (expecting struct): ~S" (#f) (#f)). It seems this is occurring because "https://bdd.fi/x/runitor?go-get=1" does not have the tag in the element, as the Go spec requires (it's a direct child of the element). However, it seems fairly harmless to relax this requirement in our importer, so the following patch should fix this. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-import-go-Match-go-import-meta-tags-anywhere.patch Content-Description: import: go: Match go-import meta tags anywhere. From ca17299a3011171d6889202003d1e888b22303ec Mon Sep 17 00:00:00 2001 Message-Id: From: Sarah Morgensen Date: Thu, 16 Sep 2021 18:27:09 -0700 Subject: [PATCH] import: go: Match "go-import" meta tags anywhere. Some personal sites forget to put in a element, so look anywhere for them. * guix/import/go.scm (fetch-module-meta-data): Match "go-import" meta tags anywhere in the page. --- 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 dad007d511..43abe004b3 100644 --- a/guix/import/go.scm +++ b/guix/import/go.scm @@ -480,7 +480,7 @@ build a package." (strip-.git-suffix/maybe repo-url))))) ;; (let* ((meta-data (http-fetch* (format #f "https://~a?go-get=1" module-path))) - (select (sxpath `(// head (meta (@ (equal? (name "go-import")))) + (select (sxpath `(// (meta (@ (equal? (name "go-import")))) // content)))) (match (select (html->sxml meta-data #:strict? #t)) (() #f) ;nothing selected base-commit: 72297993a174586ee0a23b95b6b9ee2f3db34cf1 -- 2.33.0 --=-=-=--