From patchwork Thu Nov 14 14:52:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 70395 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 CCCF327BBE9; Thu, 14 Nov 2024 14:54:24 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id DC9FF27BBE2 for ; Thu, 14 Nov 2024 14:54:23 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tBbES-0005bk-Uc; Thu, 14 Nov 2024 09:54:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tBbEQ-0005au-H7 for guix-patches@gnu.org; Thu, 14 Nov 2024 09:54:02 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tBbEQ-0002MN-8Q for guix-patches@gnu.org; Thu, 14 Nov 2024 09:54:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=0D4zExYgoWelip9OtNxbeUcZmsHiz5j2+QeBciauOOg=; b=B+GHyEaors/fPoizL+2MufYIXYzKRHfV7yYZE9IQNIXStGt6AJzo0cuAJdN8Gyy37+clb1jjT8z37VKR9iMKuU6U9+avkjwKM0qw1mNdLAU2CxBSr0kfdphH2IhhWR4QhxS7iUwcjqOtdcP8HRLElrod/NP5ICoflCaded7CqcEB6VM/C6wVzGQZXFcvUO3+M4auphISG+ulWMR0HoudD8FBzPiVbPnb5CN3u3RltgeARYNeCnFecfDc6xT+jXT43LcbbbBvTu6UHKygciFkxLeKF+j1biijqK1SS68Q/BtU8GoIkenytwQU5wN8zejajv+M61BKdzVe/cgn0uMpXw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tBbEQ-0002Yq-2j for guix-patches@gnu.org; Thu, 14 Nov 2024 09:54:02 -0500 Subject: bug#74086: [PATCH] guix: import: hackage: Support updating to a specific version. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Thu, 14 Nov 2024 14:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 74086 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Nicolas Graves Cc: 74086-done@debbugs.gnu.org Mail-Followup-To: 74086@debbugs.gnu.org, ludo@gnu.org, ngraves@ngraves.fr Received: via spool by 74086-done@debbugs.gnu.org id=D74086.17315960099797 (code D ref 74086); Thu, 14 Nov 2024 14:54:01 +0000 Received: (at 74086-done) by debbugs.gnu.org; 14 Nov 2024 14:53:29 +0000 Received: from localhost ([127.0.0.1]:45719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBbDt-0002Xx-3E for submit@debbugs.gnu.org; Thu, 14 Nov 2024 09:53:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBbDq-0002Xj-NY for 74086-done@debbugs.gnu.org; Thu, 14 Nov 2024 09:53:28 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tBbDk-00025S-70; Thu, 14 Nov 2024 09:53:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=0D4zExYgoWelip9OtNxbeUcZmsHiz5j2+QeBciauOOg=; b=K1yd3/WAyHJjoLL9DFGZ ZGzboGwdt676M3ZLavzJFXdqK2/vNO0IL74KBatwv//Sd/jFZ76gLJfh0YJmrRTsQ/SMK9bdMzkCx T1LY6DuBRoh6v+W3DovPXLMwco9inTRLiGRSrYZZVyfRN2EKyjDvAzWgOzHG5X+M8CpNWLACj/yVZ g9+PhqXcf2yeJ98x+4HEX60Gq50Oe0dvSBYWUCLtcGKtaHX6Zhs/04VDZJM5FvcTEOcfNENJtro9t hOdQeRc8lsDzB/yH3zwMaXOr7RVvBdSuZegwdkm3w7ySqrmfO3x9fBlvrr61A2noarsu57n3VoE3Q 5uY9aLxBDvkv/g==; From: Ludovic =?utf-8?q?Court=C3=A8s?= In-Reply-To: <20241029135354.17423-1-ngraves@ngraves.fr> (Nicolas Graves's message of "Tue, 29 Oct 2024 14:53:51 +0100") References: <20241029135354.17423-1-ngraves@ngraves.fr> Date: Thu, 14 Nov 2024 15:52:54 +0100 Message-ID: <87ed3doojd.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hi, Nicolas Graves skribis: > * gnu/import/hackage.scm > (hackage-fetch-and-hash, hackage-fetch): Support name and version > argument. > (import-release): New variable, formerly known as latest-release. > Support updating to a specific version. Nice. Applied with the fix below (spotted a compiler warning). Thanks, Ludo’. diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm index e3ed98c089..422887d435 100644 --- a/guix/import/hackage.scm +++ b/guix/import/hackage.scm @@ -357,7 +357,7 @@ (define* (hackage->guix-package package-name #:key (let ((cabal-meta cabal-hash (if port (read-cabal-and-hash port) - (hackage-fetch-and-hash package-name)))) + (hackage-fetch-and-hash package-name #f)))) (if cabal-meta (hackage-module->sexp (eval-cabal cabal-meta cabal-environment) cabal-hash