From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yA3LNk2HrGK9wgAAbAwnHQ (envelope-from ) for ; Fri, 17 Jun 2022 15:53:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 2LOhNk2HrGKdEAEAauVa8A (envelope-from ) for ; Fri, 17 Jun 2022 15:53:17 +0200 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 8BD747D87 for ; Fri, 17 Jun 2022 15:53:17 +0200 (CEST) Received: from localhost ([::1]:55586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2CPU-0001Rp-PK for larch@yhetil.org; Fri, 17 Jun 2022 09:53:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2CPH-0001Qj-3l for bug-guix@gnu.org; Fri, 17 Jun 2022 09:53:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50595) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o2CPG-0007IO-SD for bug-guix@gnu.org; Fri, 17 Jun 2022 09:53:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o2CPG-0007yI-ND for bug-guix@gnu.org; Fri, 17 Jun 2022 09:53:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#55854: [PATCH 2/2] gnu: Restrict gtk+ updaters to their major versions. References: In-Reply-To: Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 17 Jun 2022 13:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55854 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 55854@debbugs.gnu.org Cc: Kaelyn Received: via spool by 55854-submit@debbugs.gnu.org id=B55854.165547394830590 (code B ref 55854); Fri, 17 Jun 2022 13:53:02 +0000 Received: (at 55854) by debbugs.gnu.org; 17 Jun 2022 13:52:28 +0000 Received: from localhost ([127.0.0.1]:44492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2COi-0007xK-Gx for submit@debbugs.gnu.org; Fri, 17 Jun 2022 09:52:28 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:34654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2COd-0007ws-TP for 55854@debbugs.gnu.org; Fri, 17 Jun 2022 09:52:25 -0400 Received: by mail-ed1-f68.google.com with SMTP id o10so6292048edi.1 for <55854@debbugs.gnu.org>; Fri, 17 Jun 2022 06:52:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:date:subject:mime-version:to:cc:content-transfer-encoding :message-id; bh=+tR18ovOOrPHFsTOi1tL0plaHxFsqvpisOhSRRDSNRA=; b=hiHTr+NB80C4fogvzzN9/rLPYHDDJ8IRv8zyj9gdRi6/NXmTC3CGyhtw/goSP2A25N 6mnqHRAlvBjbys76KfMS/wzFgstDh4TQlpN8YuFth+7IaKUCqYAPND4lSdKnaCXGJ2AO SJNr9Iwo8TNUdB3kAbfau92s03vDQlGVmBS1yoWGUK7k6QC7gpXND2vpwMBcgoMFZtf+ cGVh8wIqaT8ed6E9yENjPrfbEpjpy+qLD2iluZ2DhLMoRZQqWATffDMV+xV/w7c/+UA1 IgYspUexMvy/NrHNzYoyH7k5GrBjeukmh06+OD8F2B6jChKWlERrxgeE/9QwkHO+263I oa9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:subject:mime-version:to:cc :content-transfer-encoding:message-id; bh=+tR18ovOOrPHFsTOi1tL0plaHxFsqvpisOhSRRDSNRA=; b=yn3IkKGrOL9WAW5ZbC0TRY2zo4qk4BmprV7I7nu6pxD182rT+ZwxUuLknYQjK3yqqi 9Pq34a47TBcBC1MkmoQrMDew1QcBs73deiuhYZmNkgpHC/nlQxS7o+lffyRaI0F2mW9W Ak8/lZ3QuHd/ff47M8QUYhH+FLlUG/B1J0j825MpkkS2D58D/rWkVXneSuZyBnHS7K7R GoAQh2z2wKLzHUrorLNnwxjmtuOxVCuFOesmLxD2ErS/J80P3K35aviXA8lcFghFnNML udcmoFv1iNNpfyj3R7Xjh10wgSOtM3L1aZTuFVP9St42S7OKmw5PypyvmEInO0vmMoxu vhIA== X-Gm-Message-State: AJIora+DHg9Zk96v9HrsQgvCWlFv3+xcawS7p983+RjMim+9w2wu3NDY 1nnxRFsW9MWEX/1zfy6VE4iH/QFaWIk= X-Google-Smtp-Source: AGRyM1ueAJYVqRAw9yXWoz2D3EkzAqZ2Y4L//+pvrMqBFByylUby4PwOg6H8Dxuznyn2k2GfofVooA== X-Received: by 2002:a05:6402:cab:b0:42d:c842:8369 with SMTP id cn11-20020a0564020cab00b0042dc8428369mr12563579edb.181.1655473937890; Fri, 17 Jun 2022 06:52:17 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id y17-20020a170906471100b00704dccefd2bsm2146433ejq.204.2022.06.17.06.52.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jun 2022 06:52:17 -0700 (PDT) From: Liliana Marie Prikler Date: Fri, 17 Jun 2022 15:46:29 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-ID: <8d1df21d42539c5a0690be407e60e90c7335697a.camel@gmail.com> 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1655473997; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=+tR18ovOOrPHFsTOi1tL0plaHxFsqvpisOhSRRDSNRA=; b=nSTlK5Macce8Wz4oCU9qcX6l5Z5ZmP/myQJdxFPWJbH/8EEFRAKtFcEVOSYGGhQ2yPv+6s IrHoaD0wVziZ4VdDgjussw33LIdAqDF2hmTJXSucqh6tJ+3llBib/4e+BKqU4Y024FWalY wewH8gbaPEllbDAQ1MFxsIUuYr+6wa+TGHEW25tYiKGAdla/Yd8allczCO0VnCNUDQWOhA IbOCz+NjkCxxVxZ54X0ar3O1gFLwzx7UfIC726YGp6vyua+2MocLH6aY7JTrnOQ73Uurrb 0bkqJO3UEVWLWMJOu79Qupkyr0nFfSuZl5avrAqHIWchkkzG7fz+hcGWDpr1Eg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655473997; a=rsa-sha256; cv=none; b=Rwk7B5WK+72HxZItJc27jb1qFQKuVvCgrmJJXywcZRMFygt6t8AnbdPTCdGKO5er3wRUEd 7v35EHB31JZEa9EULuc7uga4VoQV9hkxhpECu8TEzlyc303osPhvVl0+iJ/I+dgg2shueM pyjLEOMJoc6C76GdAEIvhr/svXNBCgw8ljIQfqUaimO/KlEx9alCGgDGp24U//wVVY9RYm v+I/BfB0tOKueSkC2rAH1cxMFY4KBFJTzFIU4wl86EOqBa+uvcRp+no/RLdBjrWCvc6kij y6NKNfDBxyJCJoABhPfYVRgdAXkThzoxFXo97sWhsMdnbwWYUkzlcJOLjID8Sw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=hiHTr+NB; dmarc=fail reason="SPF 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" X-Migadu-Spam-Score: 5.21 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=hiHTr+NB; dmarc=fail reason="SPF 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" X-Migadu-Queue-Id: 8BD747D87 X-Spam-Score: 5.21 X-Migadu-Scanner: scn0.migadu.com X-TUID: l1cpleX9MOWF * gnu/packages/gtk.scm (gtk+-2, gtk+)[properties]: Add update-major-version. * guix/import/gnome.scm (lastest-gnome-release): Add ‘allowed-major-version?’ and use it to filter latest releases. --- gnu/packages/gtk.scm | 6 ++++-- guix/import/gnome.scm | 33 +++++++++++++++++++++++---------- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 4d6a690fbb..73b313520f 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -939,7 +939,8 @@ (define-public gtk+-2 suitable for projects ranging from small one-off tools to complete application suites.") (license license:lgpl2.0+) - (home-page "https://www.gtk.org/"))) + (home-page "https://www.gtk.org/") + (properties `((update-major-version . 2))))) (define-public gtk+ (package @@ -1073,7 +1074,8 @@ (define-public gtk+ (native-search-paths (list (search-path-specification (variable "GUIX_GTK3_PATH") - (files '("lib/gtk-3.0"))))))) + (files '("lib/gtk-3.0"))))) + (properties `((update-major-version . 3))))) (define-public gtk (package diff --git a/guix/import/gnome.scm b/guix/import/gnome.scm index 1a0786ab8d..94a2598ab2 100644 --- a/guix/import/gnome.scm +++ b/guix/import/gnome.scm @@ -68,6 +68,17 @@ (define (stable-minor-version? version) ;; It should at last start with a digit. major))) + (define allowed-major-version? + (let ((fixed-major (assoc-ref (package-properties package) + 'update-major-version))) + (if fixed-major + (lambda (version) + (match (string-tokenize version %not-dot) + (((= string->number major) . _) + (= major fixed-major)) + (_ #f))) + (const #t)))) + (define upstream-name ;; Some packages like "NetworkManager" have camel-case names. (package-upstream-name package)) @@ -94,16 +105,18 @@ (define upstream-name (let* ((releases (assoc-ref releases upstream-name)) (latest (fold (match-lambda* (((key . value) result) - (cond ((stable-minor-version? key) - (match result - (#f - (cons key value)) - ((newest . _) - (if (version>? key newest) - (cons key value) - result)))) - (else - result)))) + (cond + ((not (allowed-major-version? key)) + result) + ((stable-minor-version? key) + (match result + (#f + (cons key value)) + ((newest . _) + (if (version>? key newest) + (cons key value) + result)))) + (else result)))) #f releases))) (and latest -- 2.36.1