From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sBzfIX4rQ2EDdAEAgWs5BA (envelope-from ) for ; Thu, 16 Sep 2021 13:33:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id sAmSHX4rQ2FtGQAAB5/wlQ (envelope-from ) for ; Thu, 16 Sep 2021 11:33:18 +0000 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 C0EC816920 for ; Thu, 16 Sep 2021 13:33:17 +0200 (CEST) Received: from localhost ([::1]:43850 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQpdk-0004ju-V9 for larch@yhetil.org; Thu, 16 Sep 2021 07:33:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60094) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQpdW-0004dj-LX for guix-patches@gnu.org; Thu, 16 Sep 2021 07:33:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42418) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mQpdW-0000yC-EM for guix-patches@gnu.org; Thu, 16 Sep 2021 07:33:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mQpdV-0006u4-Ry; Thu, 16 Sep 2021 07:33:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50618] [PATCH] import: stackage: =?UTF-8?Q?Don=E2=80=99t?= try to update packages not available on Stackage. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: lars@6xq.net, guix-patches@gnu.org Resent-Date: Thu, 16 Sep 2021 11:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50618 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50618@debbugs.gnu.org Cc: Lars-Dominik Braun X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Lars-Dominik Braun Received: via spool by submit@debbugs.gnu.org id=B.163179193224945 (code B ref -1); Thu, 16 Sep 2021 11:33:01 +0000 Received: (at submit) by debbugs.gnu.org; 16 Sep 2021 11:32:12 +0000 Received: from localhost ([127.0.0.1]:53963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQpce-0006Qw-Mc for submit@debbugs.gnu.org; Thu, 16 Sep 2021 07:32:12 -0400 Received: from lists.gnu.org ([209.51.188.17]:46416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQpcZ-0006N9-Ho for submit@debbugs.gnu.org; Thu, 16 Sep 2021 07:32:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQpcX-00047I-J3 for guix-patches@gnu.org; Thu, 16 Sep 2021 07:32:02 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:52154 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQpcV-0008W0-BI for guix-patches@gnu.org; Thu, 16 Sep 2021 07:32:01 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1631791912; bh=I/fOYEdAifK9DRIuRhK6snfgMiIkVYXpuiXV2c34NB0=; h=From:To:Subject:Date; b=Gz4Tp0sDnSmuoWeQwwxViw0IPAdbf/F9+i3JY14Es1pddWWMIl2DsUCzE4oXv2bMI ijnCJbILHI/8/0yB8CDs5zH4KFqFn8MxK9/VwZ37GfSYlme8h90WtAsRjeFD/TYbpL Vil1rIWC2gaxOf1AVOZKGf6E7KAyMSAAlWuDh3wA= Message-Id: <33ce44c6b5dc4f0c2ea2cf7a8402807d91e849a6.1631791821.git.public@yoctocell.xyz> Date: Thu, 16 Sep 2021 13:31:51 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 34 X-Spam_score: 3.4 X-Spam_bar: +++ X-Spam_report: (3.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.5, FROM_SUSPICIOUS_NTLD_FP=1.999, PDS_OTHER_BAD_TLD=1.999, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631791998; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=7c8SNOH04sJajCMqZiMKIaCl/vZlZETt4kf5IrxyvxI=; b=ZU/uvVeZpBxpKnpVjnSSJJGzbU9RJgCixwDfJEfXoV056IrIGDURPi3kLU2mcg+rdUPeJt tshusIDTvOD+7jK4Uqi1FIAlRCNL34555GzK+SVsOTRu71kWZNY6etVCsvwd1/PRRMYfW0 pxHzqchSW6qJoaSY33uhPux8UeDk4TKo0Vrgj9d6rjorjQpPiWRis1MXExHC/6vU+BuU9X 9/ppnbChQ7LjMtJl/6crpoMqDynFG4XJMBHzdhSMAdfQ0coyR3Kn+qigLa84sDDJkLS+V2 n97vT3LOiEn5w5jis+B9FgZvjxuls0ZMnyByQT8NWOA7utaexH66bc1J5/jvIg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631791998; a=rsa-sha256; cv=none; b=c9KNhc5yaea96Fe8tH3cVdAczSwg9UdMedNttBpbvApaAizGuWqkdWDGLUgEMIuLU1EuYN tNgPvWVrfZBqqwnfSJsAKsZHnJBwQHQnpOz6yV2bhxFdKKBzPwOwa13l2VobCNWxRDS87u jd+9BQLz5TdW8uwXNy6rdCxmLRLu5GvoF2c2JSE7wtpPp8YXtpNJUPsoJKC5151+dFz9mF hREI/PIiHvR6QbDV3sPplqDPH36W0aSvCgxMxvTjXvHyD3CJzqiCi4IbLrxJswnevxMd1U iXfHks2NDR7BoiM2R/0x1fXrBpXgcroD+WBAsSHFFYsb/QkPggaWP/a1ivaqgQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=Gz4Tp0sD; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -0.30 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=Gz4Tp0sD; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: C0EC816920 X-Spam-Score: -0.30 X-Migadu-Scanner: scn1.migadu.com X-TUID: P9whw66/HDSE Previously, the =E2=80=98hackage-package?=E2=80=99 predicate was used which= meant that the updater would try to update non-Stackage packages, and lead to messages like these: $ guix refresh -t stackage warning: failed to parse https://hackage.haskell.org/package/hurl/hurl.ca= bal warning: failed to parse https://hackage.haskell.org/package/idris/idris.= cabal Since =E2=80=98hurl=E2=80=99 and =E2=80=98idris=E2=80=99 aren=E2=80=99t ava= ilable on the current Stackage LTS release, they should be filtered out before the Stackage updater even tries to update them. * stackage.scm (stackage-package?): New procedure. (%stackage-updater): Use it. --- guix/import/stackage.scm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/guix/import/stackage.scm b/guix/import/stackage.scm index bbd903a2cd..5b19e2a03a 100644 --- a/guix/import/stackage.scm +++ b/guix/import/stackage.scm @@ -2,6 +2,7 @@ ;;; Copyright =C2=A9 2017 Federico Beffa ;;; Copyright =C2=A9 2018 Ricardo Wurmus ;;; Copyright =C2=A9 2020 Martin Becze +;;; Copyright =C2=A9 2021 Xinglu Chem ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,6 +26,7 @@ #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) + #:use-module (guix http-client) #:use-module (guix import json) #:use-module (guix import hackage) #:use-module (guix import utils) @@ -141,11 +143,22 @@ PACKAGE or #f if the package is not included in the S= tackage LTS release." (version version) (urls (list url)))))))))) =20 +(define (stackage-package? package) + "Whether PACKAGE is available on the default Stackage LTS release." + (and (hackage-package? package) + (guard (c ((and (http-get-error? c) + (=3D 404 (http-get-error-code c))) + #f)) + (let* ((name (guix-package->hackage-name package)) + (url (string-append (%stackage-url) "/lts-" + %default-lts-version "/package/" name)= )) + (http-fetch url))))) + (define %stackage-updater (upstream-updater (name 'stackage) (description "Updater for Stackage LTS packages") - (pred hackage-package?) + (pred stackage-package?) (latest latest-lts-release))) =20 ;;; stackage.scm ends here base-commit: a840caccaee8c9492f4cc8a7ba802ef54391f199 --=20 2.33.0