From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 35c6IdopamDVmwAAgWs5BA (envelope-from ) for ; Sun, 04 Apr 2021 23:04:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id uAIhGtopamDOZAAAB5/wlQ (envelope-from ) for ; Sun, 04 Apr 2021 21:04:26 +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 DFC4427DA1 for ; Sun, 4 Apr 2021 23:04:25 +0200 (CEST) Received: from localhost ([::1]:34754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lT9uy-0002o1-LU for larch@yhetil.org; Sun, 04 Apr 2021 17:04:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lT9ud-0002n4-5h for guix-patches@gnu.org; Sun, 04 Apr 2021 17:04:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53261) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lT9uc-0000l6-Tj for guix-patches@gnu.org; Sun, 04 Apr 2021 17:04:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lT9uc-0000hg-Qb for guix-patches@gnu.org; Sun, 04 Apr 2021 17:04:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47597] [PATCH 2/3] upstream: 'package-latest-release' tries all the matching updaters. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 04 Apr 2021 21:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47597 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47597@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 47597-submit@debbugs.gnu.org id=B47597.16175702202661 (code B ref 47597); Sun, 04 Apr 2021 21:04:02 +0000 Received: (at 47597) by debbugs.gnu.org; 4 Apr 2021 21:03:40 +0000 Received: from localhost ([127.0.0.1]:36571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lT9uF-0000gq-P7 for submit@debbugs.gnu.org; Sun, 04 Apr 2021 17:03:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lT9uB-0000gF-VQ for 47597@debbugs.gnu.org; Sun, 04 Apr 2021 17:03:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45766) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lT9u6-0000VF-Pq; Sun, 04 Apr 2021 17:03:30 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=45190 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lT9u6-00049w-6V; Sun, 04 Apr 2021 17:03:30 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Sun, 4 Apr 2021 23:03:15 +0200 Message-Id: <20210404210316.31198-2-ludo@gnu.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210404210316.31198-1-ludo@gnu.org> References: <20210404210316.31198-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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=1617570266; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: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; bh=Qk66oW6vjnoJx1bTSrY4G9WTdNYl8/s3AdhMF+TVGLQ=; b=aOLErqrIEJmMRPc90p6wCFmRd83AGDWoOiwcWHsCl63K6LaRnjSzK/Ae/4McByd575PG0j 2SLv0SjmtnhqggcTiYZDPvMfxBo9070JbJ3WAsWPSsxYUeHIT8VlKoGnOVtqoPEOSTRMYw w0nE8T0nNOetvl3yxfGnayH9VwY6e2v3l58Aw+nA2vNZK9jU8/mbCBwlAg835GdkoVACpi iHhz4V+VfbayiEZECGk5Npr0twgRItD7d1P5Eug86HYUrt/MY8k81+ICzKqOGmyNMYUkd4 Ecp6C/EExpzc313sb5tBbKwe3bdcSUlzgJLnXhQ618JyQjZISjLIBIpy0XaveQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617570266; a=rsa-sha256; cv=none; b=NNdj5tZrW+WTbv4DSVBFgvqQvRW1r2Gt4Y6TlyxAlnO+tZ+fVkgeFjFME8qeaCUpIsK2FE gjsIGS+sPGeRUlt6tplAdqC5KGTQwwoNy3oTczsrwPxeIP2P/R1iflxpISs9n/8GuUJc/h aAB0zjjGvgKvKnZLRhG2AXZyOaDwV+w4CudC7soGqrOt0U3bEQz5f3zoTw2r0mj9jacXgX oxb9BYBVEIB/iEGLvXB7BthxZBGtqo5fp/GCyz0ysqbedpe/21M7/kqYVAqWbpOYOewZrp cCs/pZJcPcs69IxYlL4Y6F+OQ8uClz98kr98VpuDFkQ59A9GexsfWt8ytJv3Og== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: 2.06 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: DFC4427DA1 X-Spam-Score: 2.06 X-Migadu-Scanner: scn0.migadu.com X-TUID: A0PS52czzvnK * guix/upstream.scm (package-latest-release): Try UPDATERS until one of them returns an upstream source. This is useful for packages with several matching updaters, such a zlib ('sourceforge' and 'generic-html'). --- guix/upstream.scm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/guix/upstream.scm b/guix/upstream.scm index accd8967d8..632e9ebc4f 100644 --- a/guix/upstream.scm +++ b/guix/upstream.scm @@ -264,12 +264,15 @@ them matches." #:optional (updaters (force %updaters))) "Return an upstream source to update PACKAGE, a object, or #f if -none of UPDATERS matches PACKAGE. It is the caller's responsibility to ensure -that the returned source is newer than the current one." - (match (lookup-updater package updaters) - ((? upstream-updater? updater) - ((upstream-updater-latest updater) package)) - (_ #f))) +none of UPDATERS matches PACKAGE. When several updaters match PACKAGE, try +them until one of them returns an upstream source. It is the caller's +responsibility to ensure that the returned source is newer than the current +one." + (any (match-lambda + (($ name description pred latest) + (and (pred package) + (latest package)))) + updaters)) (define* (package-latest-release* package #:optional -- 2.31.1