From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id qOu/BgLRomPKGQAAbAwnHQ (envelope-from ) for ; Wed, 21 Dec 2022 10:25:22 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id OErcBQLRomM4EwEAG6o9tA (envelope-from ) for ; Wed, 21 Dec 2022 10:25:22 +0100 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 D20673F75C for ; Wed, 21 Dec 2022 10:25:21 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7vLX-000564-Nq; Wed, 21 Dec 2022 04:25:07 -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 1p7vLS-00055Z-Go for bug-guix@gnu.org; Wed, 21 Dec 2022 04:25:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p7vLS-0003c7-7S for bug-guix@gnu.org; Wed, 21 Dec 2022 04:25:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p7vLS-0004Nk-1d for bug-guix@gnu.org; Wed, 21 Dec 2022 04:25:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#60200: Incompatibilities between gcc-toolchain and R packages Resent-From: Lars-Dominik Braun Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 21 Dec 2022 09:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60200 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: zimoun Cc: 60200@debbugs.gnu.org Received: via spool by 60200-submit@debbugs.gnu.org id=B60200.167161465716829 (code B ref 60200); Wed, 21 Dec 2022 09:25:02 +0000 Received: (at 60200) by debbugs.gnu.org; 21 Dec 2022 09:24:17 +0000 Received: from localhost ([127.0.0.1]:50579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7vKj-0004NN-3j for submit@debbugs.gnu.org; Wed, 21 Dec 2022 04:24:17 -0500 Received: from mout-p-202.mailbox.org ([80.241.56.172]:50792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7vKg-0004NB-GO for 60200@debbugs.gnu.org; Wed, 21 Dec 2022 04:24:15 -0500 Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4NcSgT3H0mz9sZr; Wed, 21 Dec 2022 10:24:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001; t=1671614645; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=UDR2P9oPwiuUYq4Yj4Pav5uin3GrIXsEmQDEtw/Y+9Q=; b=if+RDQrvmBOjELuBnbx4LR/zwSbarOiKmIituYF73QWZkXRc1WxT6G74tgST1+eCuHVPuq F0uo5HdEs76stBkMNWYhb24f7g/kK/t4qo9ybTIN9G2VNZ7qHyqdoOvdG4Jt20paKGRf1a Z3FkqH64OZu7mb1ZB2B3KiBXzOIr8SkawkyAcdZTC72PsKrJf6iNZRy2S0ucg+iZJZ3R93 GHdstkB0xk//Imm/v9tE7vnZ6KGjNvi3n4Is0bhjUleKr1uKbI7SZOMiJfy4+ERk7vazyk TNFMMDakA7zNp3D7CQ0cfG3hTGpI+Fw85rwd9nlyMQ700IzosigFFGwd2lUTcw== Date: Wed, 21 Dec 2022 10:24:03 +0100 From: Lars-Dominik Braun Message-ID: References: <86wn6nynp1.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="lX0Rd041EaxB9xpF" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86wn6nynp1.fsf@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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b=if+RDQrv; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=6xq.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671614721; a=rsa-sha256; cv=none; b=UK/7ntZlIkL7HWZ0K+c4F6tTq5jXuEEE9RgOfzqO/KoXBvf9I2xPEVjKrK43IIrpVZ9xNL 6YbBWl0ww61sj059wvIvaoe+8G+PzuPLhM5657KTj3kG2u4NH24WhjNtXiJEAOwJ6rCDo9 wmwL32Cr/sUJIudHJ0fwQIgqlkyhcCg0vjxQ5FGxwkRwvOxGCPh/0cI+Yf9AsWTHoQ8W8Z 2SB8NlteRIri49BgyMahehHkrZYjwH42yv1fP53AZ/I8k0SD26S/pY9U0hV5x4HGhRRM/H U59l5bp+4isDkUoeAp5lorrnoG6pMrw/8Or3T2aTgoBQyx5iYdW+LBCmPZY7BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671614721; 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=UDR2P9oPwiuUYq4Yj4Pav5uin3GrIXsEmQDEtw/Y+9Q=; b=GFp73FnC1PCihX1ahvRJlSWypMbG6QuazhjEqYZCY7cykcb3A9krL4z6zqESf4xgaFufDR /grOYYBgvS3DNicUp/zxue+TrEZLYqvyM9+wefhwjTM8IHFY7WklFmhRCi2nzXxwN/wvFP hMVkVFotB4//KNOae8a7jusJYDYGTGdGCDM34I5PEPSicqkgR/SUshVdW2twjs265QVJYl FBrYTasPWZhRe6c7c8bFic28tYvEMF16MhTzaaKBm21H4N6QPxvqdoGCvjXpdideLQQoje JRIkaZvMbIYA1c9k9TSAYNTh4c0cqviSaLSqN9CGspwUNxG5pj5ZknDaNZJb3g== X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b=if+RDQrv; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=6xq.net (policy=none) X-Migadu-Spam-Score: 5.91 X-Spam-Score: 5.91 X-Migadu-Queue-Id: D20673F75C X-TUID: dlqbUc54qNK2 --lX0Rd041EaxB9xpF Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hi Simon, > Without any specification about the version, if a package name is > defined at several versions, then the command-line uses the higher > version of this package. minor nit-pick: Not the command-line, but everything that uses specifications. So manifests via SPECIFICATIONS->MANIFEST are also affected, see: (use-modules (gnu packages) (guix profiles)) (manifest-entries (specifications->manifest '("gcc-toolchain"))) $2 = (#< name: "gcc-toolchain" version: "12.2.0" …) The -next suffix has the obvious disadvantage that specifications may become invalid as we move -next to the “regular” package. So maybe marking packages “default” like the attached patch does could improve the current situation. Not just for gcc, but also Haskell and Python come to mind. Cheers, Lars --lX0Rd041EaxB9xpF Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="default-gcc-toolchain.patch" diff --git a/gnu/packages.scm b/gnu/packages.scm index 61345f75a9..7e5a6d49c2 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -356,20 +356,24 @@ (define cache (find-packages-by-name/direct name version)))) (define (find-best-packages-by-name name version) - "If version is #f, return the list of packages named NAME with the highest -version numbers; otherwise, return the list of packages named NAME and at -VERSION." + "If version is #f, return the list of packages named NAME with only +packages marked default? or, if none exist, the highest version numbers; +otherwise, return the list of packages named NAME and at VERSION." (if version (find-packages-by-name name version) (match (find-packages-by-name name) (() '()) ((matches ...) - ;; Return the subset of MATCHES with the higher version number. - (let ((highest (package-version (first matches)))) - (take-while (lambda (p) - (string=? (package-version p) highest)) - matches)))))) + ;; Return the subset of MATCHES which are marked default or those with + ;; the higher version number. + (let ((highest (package-version (first matches))) + (default (filter (lambda (p) (assoc-ref (package-properties p) 'default?)) matches))) + (if (not (null? default)) + default + (take-while (lambda (p) + (string=? (package-version p) highest)) + matches))))))) ;; Prevent Guile 3 from inlining this procedure so we can mock it in tests. (set! find-best-packages-by-name find-best-packages-by-name) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index b4566b41cc..2d5e0add26 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -3855,7 +3855,10 @@ (define* (make-gcc-toolchain gcc ("libc-static" ,libc "static")))))) (define-public gcc-toolchain - (make-gcc-toolchain gcc-final)) + (let ((parent (make-gcc-toolchain gcc-final))) + (package + (inherit parent) + (properties (alist-cons 'default? #t (package-properties parent)))))) (define-public gcc-toolchain-4.8 (make-gcc-toolchain gcc-4.8)) --lX0Rd041EaxB9xpF--