From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id MOL7I9VV9maHhAEA62LTzQ:P1 (envelope-from ) for ; Fri, 27 Sep 2024 06:51:01 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id MOL7I9VV9maHhAEA62LTzQ (envelope-from ) for ; Fri, 27 Sep 2024 08:51:01 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=civqvg3c; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=AyiJGJGG; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1727419861; 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:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=6qvtB7GzTEj0TrZKR2CuiVfDVdeXSMxSbif1AiDhdh0=; b=DlnhIXc5e5SOwxeCCwSjqOJJdY7bysPlLa0lKiIKyniNyqkqnK+J3WZFPwgIJ9jPdqrZY+ QmEY3zjA8eHOQjCGDxQrt8oeMuoKskZ8b/qZe/ebPVjZAr7WhCx1A2TjYMxsSXrZjLSU4o 1bK5sa+dJ3PCB+h9y8ENZrIrq2hh7LQrXk9rYdYfNR2fHW/ZLvuAX5357aZeEWVPM2K3+x JseDLVEGPq3mlZhaVEFh98vA0/J/9/8EFgvTNwzfXQGhUTubr5CBeNbtrI+w1z7F74iwGh 1sNKKw2SK8oLohIh71bUAFN2S8k1uCR59Ozm1Uh4ZusrzYd7N40Ls3v3Q0c8Tw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1727419861; a=rsa-sha256; cv=none; b=SchOv09PE9NZjl0mUAYiOH0ID3i9hqi1BK3sYJw+SDgeSmgDr2cMAzg0jhB2oZxQKFqcw2 cShwKjJlsaL9ZnRMGVyvpU8jR/YOk250FshsO4Fx1SSJudUHeO0QCgojGLCmowccnFNGcy wqKAEECr/Q0NhWQhBsIYdt74kly6jz8f4KIibO0mHcAAgFsa6xNz3k0dYvl2HHGNW8QUCx ScIJaAsQVLuU3rdShA9YmAT9S6G5FQFcufGXDJL4qYEt0lkzXWL3NoxNRP8+lbfpVnS7TF l7zDkAxPnprzSWpXX/aCfe3GT2YlmnF3uvH0zx5D3dLPlBZElvn8jFK9r88zpw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=civqvg3c; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=AyiJGJGG; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" 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 346459385A for ; Fri, 27 Sep 2024 08:50:59 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1su4oJ-0005zR-TJ; Fri, 27 Sep 2024 02:50:41 -0400 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 1su4oE-0005z3-Mb for bug-guix@gnu.org; Fri, 27 Sep 2024 02:50:34 -0400 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 1su4oE-0007yP-BM for bug-guix@gnu.org; Fri, 27 Sep 2024 02:50:34 -0400 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:From:To:Subject; bh=6qvtB7GzTEj0TrZKR2CuiVfDVdeXSMxSbif1AiDhdh0=; b=civqvg3cRxWfFvJiA9O/bfQcFNh805dTcRGuMuusHd+IIRelxu0H162DE3SDQ+JHGPvQSFLOBcikrQiIduxk2JR/GP3lEJ/WpmjnXgfSd01G8NMGnNebKSLNFphWLOv60xeDOuqnekux7QELxjv1snAyC0lQ4nzeNiGzULx04mqMSK30yAITf0pgu4a2zr2oKbC0EHlnCexZrXo0Jq0dQS4JsiZwMt8qItSz6QMepwTXPfhrCeRqnaSIuzyrhh7OF0xIBCYyvu8FwPPGhFd2Z0nqTrw5Tm7UiB7NdBqdzhQ7Y8vmR7BjLIYWkAeEH+ghf0r3iBReNLarkGaAJcRliQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1su4of-0001xN-Tz; Fri, 27 Sep 2024 02:51:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#73508: Generic updaters should run last Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: liliana.prikler@gmail.com, bug-guix@gnu.org Resent-Date: Fri, 27 Sep 2024 06:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73508 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 73508@debbugs.gnu.org Cc: Liliana Prikler X-Debbugs-Original-To: bug-guix X-Debbugs-Original-Xcc: Liliana Prikler Received: via spool by submit@debbugs.gnu.org id=B.17274198266979 (code B ref -1); Fri, 27 Sep 2024 06:51:01 +0000 Received: (at submit) by debbugs.gnu.org; 27 Sep 2024 06:50:26 +0000 Received: from localhost ([127.0.0.1]:45322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1su4o6-0001oU-Au for submit@debbugs.gnu.org; Fri, 27 Sep 2024 02:50:26 -0400 Received: from lists.gnu.org ([209.51.188.17]:59960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1su4o3-0001oM-WC for submit@debbugs.gnu.org; Fri, 27 Sep 2024 02:50:24 -0400 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 1su4nb-0005sL-6x for bug-guix@gnu.org; Fri, 27 Sep 2024 02:49:55 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1su4nY-0007jk-WB for bug-guix@gnu.org; Fri, 27 Sep 2024 02:49:54 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-71b070ff24dso1563998b3a.2 for ; Thu, 26 Sep 2024 23:49:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727419790; x=1728024590; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=6qvtB7GzTEj0TrZKR2CuiVfDVdeXSMxSbif1AiDhdh0=; b=AyiJGJGGQDrHQRtZgE0MQ7j0Nwpiw5B/Y0b0dVqOSfosISLFcspE6oZwA6cwkuoctB 8GJ2rpjJXvpmUiYmiNSPSIA0QRJWJPyBnnu1HI2lT+UwtyUczEfFqJB2e0N4XlArfKXJ undJo4DLUL521/w7zAgEup3N5oJUe10RomnEEQYt3XvG+Wj0nAdYmXFHpJ5En+Sok0ve Ee/Ybegt+51McIWmYNRKKyLDSFYaCM6se9wS2GN6vsOcI6JZHOvRWcahpESiXsB2Y/Mc g8Ia3DSEp7Cji8+yvgBJFHcSf3Hf7BwjqdbNVh5wFpzTnjMpvGUXnH//tQ7hx8MJ8y+A zhjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727419790; x=1728024590; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=6qvtB7GzTEj0TrZKR2CuiVfDVdeXSMxSbif1AiDhdh0=; b=d6/ywAxY3T1S4ZMmtzNKPUSuTn+fwJxGI48l0lwGuvcnPPWSPTPQ5mFcjMMPwzLEUD Dh+/00kShc6No/PhYlU+eMxL6pHuzL8gCUeQVIP8oJbiFQOeUyXgiXWQL2gvVYpCSCfu V3p0+SUKV9ClkVSKU69IcNk9pV9hSAnDiz6e7gffZjSWV9CWh9HAwuQ1VfCJfgyJVJEv wVYAr4/aTHWKKcryiTh0+U+cVRrUgYZgMzVc7i8gCstmUVQJaMTfUkQXLFbJUzng5KuP vqtiew11hGUXVNT+gzmqy7IPn6FqagO7m66FYPxfHxLUswl2DFsQsIScPlosiGUTuBAI Smgg== X-Gm-Message-State: AOJu0YyBPkAicsvdAf3kALrXp4yKSbaGH+sF0tdkVtlt5/rXPpyWeKPX nf9n+bffOkdulMtzzFQ6WayAo9VDzJxeNZ7rYWZ3glbGkQyTh84SfxGbf+7V X-Google-Smtp-Source: AGHT+IHHktjYo6stbBDMc9isyCaVX4UPQ4Z3FW9cVtwzTeNAHOi75EU9eGmtAS8PMV1CdHQGnyWRiQ== X-Received: by 2002:a05:6a00:1798:b0:718:dc55:728a with SMTP id d2e1a72fcca58-71b25f3b70fmr3846633b3a.8.1727419790077; Thu, 26 Sep 2024 23:49:50 -0700 (PDT) Received: from hurd ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71b2649c2b1sm918951b3a.4.2024.09.26.23.49.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 23:49:49 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 27 Sep 2024 15:49:46 +0900 Message-ID: <878qvdegl1.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=maxim.cournoyer@gmail.com; helo=mail-pf1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 346459385A X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -1.97 X-Migadu-Spam-Score: -1.97 X-TUID: vkasczQitnYd Hi, Currently the updaters are run in the order of their alphabetical names. For example, with the following instrumentation to see the updater names tried in guix/upstream.scm: --8<---------------cut here---------------start------------->8--- @@ -259,6 +271,7 @@ (define* (package-latest-release package one." (any (match-lambda (($ name description pred import) + (pk 'trying-updater: name) (and (pred package) (import package #:version version)))) updaters)) --8<---------------cut here---------------end--------------->8--- attempting to update gnome-desktop produces: --8<---------------cut here---------------start------------->8--- ./pre-inst-env guix refresh gnome-desktop ;;; (trying-updater: bioconductor) ;;; (trying-updater: composer) ;;; (trying-updater: cpan) ;;; (trying-updater: cran) ;;; (trying-updater: crate) ;;; (trying-updater: egg) ;;; (trying-updater: elpa) ;;; (trying-updater: gem) ;;; (trying-updater: generic-git) ;;; (trying-updater: generic-html) gnu/packages/gnome.scm:2265:13: gnome-desktop would be upgraded from 44.0 to 44.1 --8<---------------cut here---------------end--------------->8--- It seems to me the generic updaters, being generic thus less likely to be precise/correct, should be tried last by 'guix refresh'. This is ensured with the following patch: --8<---------------cut here---------------start------------->8--- modified guix/upstream.scm @@ -48,6 +48,7 @@ (define-module (guix upstream) #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) + #:use-module (srfi srfi-71) #:use-module (rnrs bytevectors) #:use-module (ice-9 match) #:use-module (ice-9 regex) @@ -226,15 +227,26 @@ (define (importer-modules) (define %updaters ;; The list of publically-known updaters, alphabetically sorted. (delay - (sort (fold-module-public-variables (lambda (obj result) - (if (upstream-updater? obj) - (cons obj result) - result)) - '() - (importer-modules)) - (lambda (updater1 updater2) - (stringstring (upstream-updater-name updater1)) - (symbol->string (upstream-updater-name updater2))))))) + (let* ((updaters + (sort (fold-module-public-variables + (lambda (obj result) + (if (upstream-updater? obj) + (cons obj result) + result)) + '() + (importer-modules)) + (lambda (updater1 updater2) + (stringstring (upstream-updater-name updater1)) + (symbol->string (upstream-updater-name updater2)))))) + (generic-updaters rest (partition + (compose (cut string-prefix? "generic" <>) + symbol->string + upstream-updater-name) + updaters))) + ;; Ensure the generic updaters are tried last, as otherwise they could + ;; return less accurate results. + (append rest generic-updaters)))) ;; Tests need to mock this variable so mark it as "non-declarative". (set! %updaters %updaters) @@ -259,6 +271,7 @@ (define* (package-latest-release package --8<---------------cut here---------------end--------------->8--- Now, the 'gnome-updater' at least ends up being tried before the 'generic-html': --8<---------------cut here---------------start------------->8--- ;;; (trying-updater: bioconductor) ;;; (trying-updater: composer) ;;; (trying-updater: cpan) ;;; (trying-updater: cran) ;;; (trying-updater: crate) ;;; (trying-updater: egg) ;;; (trying-updater: elpa) ;;; (trying-updater: gem) ;;; (trying-updater: github) ;;; (trying-updater: gnome) gnu/packages/gnome.scm:2265:13: gnome-desktop would be upgraded from 44.0 to 44.1 --8<---------------cut here---------------end--------------->8--- I'll send a 'git format-patch' version in a follow-up. -- Thanks, Maxim