From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0HVqDgmWUWFV4wAAgWs5BA (envelope-from ) for ; Mon, 27 Sep 2021 11:59:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id kBoPCgmWUWEKIQAAbx9fmQ (envelope-from ) for ; Mon, 27 Sep 2021 09:59:37 +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 D033613E0B for ; Mon, 27 Sep 2021 11:59:36 +0200 (CEST) Received: from localhost ([::1]:38126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mUnQ7-0005jb-SI for larch@yhetil.org; Mon, 27 Sep 2021 05:59:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUnNe-0000zO-Rv for guix-patches@gnu.org; Mon, 27 Sep 2021 05:57:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56363) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mUnNe-0007dV-Ga for guix-patches@gnu.org; Mon, 27 Sep 2021 05:57:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mUnNe-0000s6-Dl for guix-patches@gnu.org; Mon, 27 Sep 2021 05:57:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50618] [PATCH v2] 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: guix-patches@gnu.org Resent-Date: Mon, 27 Sep 2021 09:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50618 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Lars-Dominik Braun Cc: 50618@debbugs.gnu.org Received: via spool by 50618-submit@debbugs.gnu.org id=B50618.16327365813301 (code B ref 50618); Mon, 27 Sep 2021 09:57:02 +0000 Received: (at 50618) by debbugs.gnu.org; 27 Sep 2021 09:56:21 +0000 Received: from localhost ([127.0.0.1]:39676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUnMw-0000r8-81 for submit@debbugs.gnu.org; Mon, 27 Sep 2021 05:56:21 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:45880 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUnMt-0000qr-Is for 50618@debbugs.gnu.org; Mon, 27 Sep 2021 05:56:16 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1632736563; bh=iz8zzMvei+yr4oVmWO6pvM5Ir9PHqGGHOk3tb6aUzIU=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=rGDBzqMNC97o2qsO9SFFqvnJ6KZeTsZOujaOVPTQKFIWz/Y+6OVvwtxpLP+WIeT6G bzucWto2TVejW2M3wj4ooElY4msKdCk3aBxSwvzTKAnTZw1OPqReN/RJS7i0l4mYyp ysT80Dd3vuuIhJcM6Fg72GAojBmD1Rupex47PvxY= In-Reply-To: References: <33ce44c6b5dc4f0c2ea2cf7a8402807d91e849a6.1631791821.git.public@yoctocell.xyz> <0aa369b60b785e933cab9de136cf9745dc4ea50a.1632324617.git.public@yoctocell.xyz> Date: Mon, 27 Sep 2021 11:56:02 +0200 Message-ID: <874ka67365.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" 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=1632736777; 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: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=xxFSZmHOFi1J0BXHMFT9HOk+RLu4ZUTcpFY8th5gfWk=; b=Ot4I9Zo48g/sBYgRu4t+gdDNuGdeq+cHoMR948pe0c8qjC05lZ0B50PgGroo0q+TmTMEC1 JiiRlL4e3fF+Ow20xvNvqJclXAY4jnfyVkSJAF5YDjV5KZT7Ze87ijX2jCh7OfEY0fdiBh xTMXl7eNV15sW/fSm2DUR1YT9N1pIlz9hrgnworSbbxSXJlcxyHArEIPYSS+8iIChgSs3Y 0qIQZEQ80t8Xz2wjziPxo7zGBqHKLD9GIn+D79Ajxn9HvhRtYcJZ7qj0I3aJdIDXNru3/l zqFLcIcvNv49IpPcopeJrH3F1Sp3CNlv2eGxy/502g/2Vpd7wrWyoinTLdSf7w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632736777; a=rsa-sha256; cv=none; b=LP7IgCZhVT+/ujBwZlTxHfRc5IkyLfKpXOOHlvkB1nhR44q4xWE3+VDMLYVOcPwm5ibOXQ c3IwO53Gq6cHGOw8gsLkV/XgqbBoNnCL2v6Z95eg0lMYh5VcOQ+UHYjOlGi5aJOUZYgRNE kxOZE924W557DsP3rb/SUBrnjWzrIEd3Hn8tbIM+VQqGLKmosbRNiOYdJte8wMpYKWhfT8 BKOJK2jKtgo/Dqz5wDCFLEJQuMahmj8fFs8gkF8C3Y2EO8t3TYzSY43gzbf8GlBywUrY/S XEIWDe2tCJv20aXirhDwOamVHqpslHbhWh8TRORn8dhPIwwMR3n3s02c08o2Yw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=rGDBzqMN; 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: -3.39 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=rGDBzqMN; 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: D033613E0B X-Spam-Score: -3.39 X-Migadu-Scanner: scn0.migadu.com X-TUID: x86MIoLJ15Rl --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain On Mon, Sep 27 2021, Lars-Dominik Braun wrote: > Hi, > > for some reason I cannot get this patch to apply. `git am` fails and also > `patch -Np1` spits out an error: > > patching file guix/import/stackage.scm > patch: **** malformed patch at line 47: @@ -141,11 +145,23 @@ Hmm, it seems to fail for me as well, but with a different error. I have attached the patch below. > Can you push it somewhere? Sure, but I think its easier for you to just apply the attached patch. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-import-stackage-Don-t-try-to-update-packages-not-ava.patch Content-Transfer-Encoding: quoted-printable From=2049f705217487aacfd6ab0b794b07eea9262d7661 Mon Sep 17 00:00:00 2001 Message-Id: <49f705217487aacfd6ab0b794b07eea9262d7661.1632736427.git.public= @yoctocell.xyz> From: Xinglu Chen Date: Thu, 16 Sep 2021 13:29:42 +0200 Subject: [PATCH] =3D?UTF-8?q?import:=3D20stackage:=3D20Don=3DE2=3D80=3D99t= =3D20try=3D20to?=3D =3D?UTF-8?q?=3D20update=3D20packages=3D20not=3D20available=3D20on=3D20Stac= kage.?=3D MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit 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. =2D-- guix/import/stackage.scm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/guix/import/stackage.scm b/guix/import/stackage.scm index bbd903a2cd..731e69651e 100644 =2D-- 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. ;;; @@ -21,10 +22,12 @@ (define-module (guix import stackage) #:use-module (ice-9 match) #:use-module (ice-9 regex) + #:use-module (ice-9 control) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) + #:use-module (srfi srfi-43) #:use-module (guix import json) #:use-module (guix import hackage) #:use-module (guix import utils) @@ -141,11 +144,23 @@ (define latest-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) + (let ((packages (lts-info-packages + (stackage-lts-info-fetch %default-lts-version))) + (hackage-name (guix-package->hackage-name package))) + (vector-any identity + (vector-map + (lambda (_ metadata) + (string=3D? (cdr (list-ref metadata 2)) hackage-na= me)) + packages))))) + (define %stackage-updater (upstream-updater (name 'stackage) (description "Updater for Stackage LTS packages") =2D (pred hackage-package?) + (pred stackage-package?) (latest latest-lts-release))) =20 ;;; stackage.scm ends here base-commit: 8c6c33a2a5bf385e1589b405ee7f842684ed80c1 =2D-=20 2.33.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmFRlTIVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5vi4P/1hOvAwhToZxNdRE9DM3KtwYMEzl iplJskNWEM2y5wXz4YUXqPOs77Bx7M1yOnQvrwCaZcJy/XPSd/2eopI0MhiBSRhU 2F9MYfEKAQgDu76AnOBwOq5yWEhDhfqL2oULAPff2aoYAkZEVNw4/IRmiZKcLi9e zFh/d88X7ME509/3OLEbAHkvGw11IPaiYA7WBzXGCr0ZsQ75kNvfRfdjy4ohGG2m u6HU25ZCF4LrG2xoG8RypcC3G1eVXMWuCyLebTGDIJ5Komxzyikw9LBsDk8p4v63 iHCd78OeV/rIe/VFFPcpHASJQUmO4q+fW68x4IPDHOHE7+dX/9/lLC9FpWEBJtJF egaTCZipm0Y2Hw06IfC21Q5tm8y6ImsN/4rK3flnPhIUSUvS7uIKhjNAgxdCEGgU yBD5AIQ/49WJnKanLjs4LiiGYI1GwNSSDEeB9fSFlYOSF5/TCN5yx+ZSiusyMJ4Y I6hPt5tdGWZXafjPNXjdEFc9VRpJV858xB01dhnscoU9yt7DgF++LwXbac1RBPGM UJodYZ4yHamdraDApQ83NnLjNEMOOECTwUFrSJrlX+HLGYVdB2Ydje9H7H4JgLWc z6C59bh228Zg/adpW4N2xirPLWjdk6kdSRDRfAkTmTprnqJnfM5HOCdIUA2CzLR/ Eao4hYzVCP23BWWj =Ax+7 -----END PGP SIGNATURE----- --==-=-=--