From patchwork Wed Feb 5 07:49:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Dominik Braun X-Patchwork-Id: 20133 X-Patchwork-Delegate: mail@cbaines.net Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 76498168CF; Wed, 5 Feb 2020 07:50:14 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id A4BE9168CA for ; Wed, 5 Feb 2020 07:50:13 +0000 (GMT) Received: from localhost ([::1]:42420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izFRt-00046Z-45 for patchwork@mira.cbaines.net; Wed, 05 Feb 2020 02:50:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44481) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izFRj-00046T-Vg for guix-patches@gnu.org; Wed, 05 Feb 2020 02:50:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izFRi-0003Hr-MW for guix-patches@gnu.org; Wed, 05 Feb 2020 02:50:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39101) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1izFRi-0003Hg-Ig for guix-patches@gnu.org; Wed, 05 Feb 2020 02:50:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1izFRi-0003aj-Fg for guix-patches@gnu.org; Wed, 05 Feb 2020 02:50:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#39430] Use =?utf-8?b?Q1JBTuKAmXM=?= canonical URL as home-page Resent-From: Lars-Dominik Braun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 05 Feb 2020 07:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39430 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 39430@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158088898513763 (code B ref -1); Wed, 05 Feb 2020 07:50:02 +0000 Received: (at submit) by debbugs.gnu.org; 5 Feb 2020 07:49:45 +0000 Received: from localhost ([127.0.0.1]:45074 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izFRQ-0003Zv-Nt for submit@debbugs.gnu.org; Wed, 05 Feb 2020 02:49:44 -0500 Received: from lists.gnu.org ([209.51.188.17]:39575) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izFRO-0003Zj-4p for submit@debbugs.gnu.org; Wed, 05 Feb 2020 02:49:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44456) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izFRK-00043p-HO for guix-patches@gnu.org; Wed, 05 Feb 2020 02:49:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izFRI-0002nP-P7 for guix-patches@gnu.org; Wed, 05 Feb 2020 02:49:38 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:35477) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1izFRI-0002lw-Cv for guix-patches@gnu.org; Wed, 05 Feb 2020 02:49:36 -0500 Received: by mail-wr1-x42e.google.com with SMTP id w12so1416472wrt.2 for ; Tue, 04 Feb 2020 23:49:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leibniz-psychology-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=Sm+XDQuJtaa34qwOwqFAegkZJFD23xMQ5jD/dZJtWHM=; b=T1o/T03E0oWlTBEDvYoaOMRIbS/f4jTiXs4ZmgCwNLY+1qdYjxOGO+4O+emIm5Ig0A 9kme0jBuWIAU+qcqNEQcf8uj0zOQDVBEE8crBsZ3ZeLQw5WbI0Jh8CirkgOLYSmUQHcN IXY3RmrAxTIgbbTv3Kq0gYip/DfSrNspt02PyHtnC9oJALIEAWF3E0Ukl1P3ZQGqEQpD C8uDWdlW/GIKcb6ORcLmSLkLW9uAUBCjfnDFX5oD93fgvt6tQWIq7P8kc8zdUltmHKL1 Ytsj7Fj1XEjDgXsq9hc14BI3OidBlfYbD3KH2UTFbWlskSwsjrYYKwBA0egk+cWDEakt 3oeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=Sm+XDQuJtaa34qwOwqFAegkZJFD23xMQ5jD/dZJtWHM=; b=oTZeDEid1NaIcAAPRZUYp2EPQMRG9wxdvLOlQxWvvnzrt/E1u1F1F/JRderKk+Kere HlTyg+4w354ONF5NLppweUlGacGBPoGtJ1amggm32LR7yS2XXoOtYvO4j426pJRmc7GD 2Pg/GwJw3d8NnetIzyXmCVFYFfgUoITCLMBFPZOGhYEP4JkGr5aS4QmDoT24n53xx1X1 /CyzjErHxloaRo84emI2nrcq17mWjnypW83zZxqjVBQwJRvFvBibKADPuiMVaNUmzWW6 XM3xVGq1kkH8SsOfiEHO81HDOZeoSzjTcQq2ywpyaeJ0JJp3SBBv+kTfLcQ/tpCpVj0P iwlw== X-Gm-Message-State: APjAAAVgHOQKMxEiR2eO9F3rg8OEEdDWBic0up80vCz63SIFPVt6c8Lm nNkxb+InFre4rZBMZr+59vd2w4hkacLU9YgNB1aZqaGtx3v9dO9t5Ih6oj0/4bO0Yya1OpduNpI 2RsoDSWlSSOFU1K7n5l6hg4fJ1w0BhS4tBD7qhgxaqixNngFM40jpAaIh1cg071/uPU8NQI8DW3 xXg0TwYl0= X-Google-Smtp-Source: APXvYqwMUpIehLvsCz2lxpcvbpKsUs7z7V0+veGgy/YdAgNMaGdzyz7OiE1JB0Qc6Nl3wtbQT6T1aQ== X-Received: by 2002:adf:e5c2:: with SMTP id a2mr24164200wrn.85.1580888974821; Tue, 04 Feb 2020 23:49:34 -0800 (PST) Received: from localhost (zpidlx9.uni-trier.de. [136.199.85.49]) by smtp.gmail.com with ESMTPSA id k8sm25563367wrq.67.2020.02.04.23.49.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Feb 2020 23:49:34 -0800 (PST) Date: Wed, 5 Feb 2020 08:49:33 +0100 From: Lars-Dominik Braun Message-ID: <20200205074933.GH2917@zpidnp36> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi, I noticed for packages not specifying any URL the CRAN importer emits home-page URLs like https://cran.r-project.org/web/packages/ (without trailing slash). These are permanent redirects, thus the linter complains about them. One option would be adding a trailing slash or use the canonical URL, as provided by CRAN (on the bottom of the description page). The attached patch does the latter. Lars From 01a43735fe5b2ee5c34431d9e5109e3718e7612b Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Wed, 5 Feb 2020 08:26:08 +0100 Subject: [PATCH] =?UTF-8?q?import:=20cran:=20Use=20CRAN=E2=80=99s=20canoni?= =?UTF-8?q?cal=20URL=20as=20home-page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * guix/import/cran.scm (%cran-canonical-url): New variable. (description->package): Construct home-page using canonical URL. --- guix/import/cran.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/guix/import/cran.scm b/guix/import/cran.scm index bcb37ed250..9f1214324c 100644 --- a/guix/import/cran.scm +++ b/guix/import/cran.scm @@ -134,6 +134,7 @@ package definition." `((,type (,'quasiquote ,(format-inputs package-inputs))))))) (define %cran-url "https://cran.r-project.org/web/packages/") +(define %cran-canonical-url "https://cran.r-project.org/package=") (define %bioconductor-url "https://bioconductor.org/packages/") ;; The latest Bioconductor release is 3.10. Bioconductor packages should be @@ -402,6 +403,10 @@ from the alist META, which was derived from the R package's DESCRIPTION file." ((cran) %cran-url) ((bioconductor) %bioconductor-url) ((git) #f))) + (canonical-url (case repository + ((cran) %cran-canonical-url) + ((bioconductor) %bioconductor-url) + ((git) #f))) (uri-helper (case repository ((cran) cran-uri) ((bioconductor) bioconductor-uri) @@ -415,7 +420,7 @@ from the alist META, which was derived from the R package's DESCRIPTION file." ((git) (assoc-ref meta 'git)) (else (match (listify meta "URL") ((url rest ...) url) - (_ (string-append base-url name)))))) + (_ (string-append canonical-url name)))))) (source-url (case repository ((git) (assoc-ref meta 'git)) (else -- 2.20.1