From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.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 sGM3AG+DF2cnAQAAqHPOHw:P1 (envelope-from ) for ; Tue, 22 Oct 2024 10:50:23 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id sGM3AG+DF2cnAQAAqHPOHw (envelope-from ) for ; Tue, 22 Oct 2024 12:50:23 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=HOTMAIL.IT header.s=selector1 header.b=n5hvNRP8; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=hotmail.it; arc=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1729594222; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=kCMDClm7G+kTuK8wO8VXNK2fny3tBDM94nB6yT0nxEY=; b=jadPmoQfT7C40mvwLQdKVbyn0MKfUkFIRVB9hRqT9SnZmKcdNCUi06jsiQdHzCfCVaQWDS NbS+sRqVVseopd3kHi+Cp1M1Oan4fuoW6396hT3zh2+PRO2F9oHusRs8FF1/p49ffLFiJ4 +Mf02NhANmKtWyVbPGmgZVg8UnfMpc3eQCxt7mak5IyXqy+dq2AeYczj/txGzya4Td8/pO FuOsxMtmp5O5jFAijWRJCYLQza9L43YE9zUILOb545HX4WlKrnrtORYb5O6r+LO0Y98/pg 3QNoUJGjTlbr7f5hmVyPl+sWtzg3xno5eoRHHVudcoYhbktHfSbl9sveH4ekrA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=HOTMAIL.IT header.s=selector1 header.b=n5hvNRP8; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=hotmail.it; arc=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Seal: i=2; s=key1; d=yhetil.org; t=1729594222; a=rsa-sha256; cv=pass; b=ixmgV/gwVGcIhFvoQBN6LoSY9jwXlW8mP6cLwzy+hUL3/SmCK5Mombo/fAxnAP4jdq/9uf gtvD7kksZujvNAuxVUQy6bFWyMQAorg1i2R9d5A0ULGcLH3IrlvOpjaFO6rmN5zlBkEz+D z8B7tpZI/H91XbASBSl/Se9uYRWvvyD6kjVYD1UR0EcJ04TqBO7cHsxVp0FZfzmPOnGOEX JiG17PW2mrV5BIQSeROVKagk6b7Zg+b2Epdn+36Mu3GIDHTtzs8kmuzlCLEH46c6reOr2O L5M9FAvcEd8k/QP6LrM391oDS+ixTnVdKDveo3reT45g5R/YFUJjU6JZp7DuEQ== 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 6D1CB46F17 for ; Tue, 22 Oct 2024 12:50:22 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3CSM-0006Ho-9C; Tue, 22 Oct 2024 06:49:42 -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 1t3CSG-0006Fa-VA; Tue, 22 Oct 2024 06:49:37 -0400 Received: from mail-vi1eur03olkn2098.outbound.protection.outlook.com ([40.92.57.98] helo=EUR03-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t3CSF-0000kW-6A; Tue, 22 Oct 2024 06:49:36 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XLzKAT8oP0Xw8N/+08rpuu0hDfpWo65XWaCirCfa1+VyeLnOqE9GkQ6IswrjSZrwcRlaqpo1UHojl/as1jFLhPfuNj0ff/05UFrYBkbVBMEGIR3IU9nvXTWNXEFTjRV8hMV+NLliX/vEkIeMJVHC4DhK5E57ShagjteuRAwE56Nw2YRPq/gXdT9m0xcSTSlRVN69CerlvHwlcejD5tMrwWLZ6VtyoxjSV25XYV/ZbolN4oKdiHXGHWpbNAM1tO6zJr/Ajsw9VXi7zJKcKwUkau3602KfhrfLrPQxCMzoB/sv5GqCl8uLi1nGpvLDr2C9GTOxI/sDFZyTrXewO7ZfxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kCMDClm7G+kTuK8wO8VXNK2fny3tBDM94nB6yT0nxEY=; b=fB4LbZO4yvOOrUS3NvsrNLbkTBs8MBme8xsiqK5vZN1mrAQiJXbzKtdIMjLMXGs0J/bM0WBzwG07qWe4LWwCWkNia0Lf+dT8hd1tmkC+d9/TlTY1FFZA2qFvgSpeTVHU2evmqSGpqSsQcs6ZI1263jEPVhY/H2e2m2qWt8T/pcKvHJ/iiQ4+tQJPcGyEzbrZwEJdUz8T48kdcMe68cL5S3rhtdoDweUjYWY6NWUl95ztJYdK4TCKrL+7PMCpy0CMkHZ1nUyhd6143BxtF5Bkp6n36unmRoKmlS2Y6Uke0ShyWX85Q+EDzu8wTdOoQgspNHd7dM3d3MaKJ/6du31ySA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=HOTMAIL.IT; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kCMDClm7G+kTuK8wO8VXNK2fny3tBDM94nB6yT0nxEY=; b=n5hvNRP8VVy4nlyBvA3QaHd1WKbHdvg0n7wW0oRm9j8wc9mIkbIHZqMtWPsh5mtGgwgfKSKvTLcw+nfTmwHPF+dyg0dtk3+BAyZXFQwd0vWEBFgOrETt7jl7wUUCLXNyuoCosXWOJuvlJqaHYj9zxfA4fVdnR/TS8VgALIgyDH2C0IF4jL4vuAHbAEnQR36AvOUw+JQ1DxkxQwC0h5VkKTw1wE8hiK9JegGf2seJ7XTKV7T3aViCBg+nv8aRSj0bBwtVEZfpeeN04BVmGRpPaTXP0R6j6Tb6bWORZ5wJbUsbz7t9gk992OYnKP0tjtH+rlrFb8PKGB7A3Z9tUIj8jQ== Received: from AS8PR10MB5829.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:525::9) by PA1PR10MB8643.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:443::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Tue, 22 Oct 2024 10:49:32 +0000 Received: from AS8PR10MB5829.EURPRD10.PROD.OUTLOOK.COM ([fe80::a705:2fe4:69df:1e30]) by AS8PR10MB5829.EURPRD10.PROD.OUTLOOK.COM ([fe80::a705:2fe4:69df:1e30%6]) with mapi id 15.20.8093.014; Tue, 22 Oct 2024 10:49:32 +0000 From: Marco Fortina To: "guix-patches@gnu.org" , "guix-devel@gnu.org" Subject: [bug#62917] [bug#73799] [PATCH] Fix 'guix shell: error: symlink: File exists: "/bin/cc"' Thread-Topic: [bug#62917] [bug#73799] [PATCH] Fix 'guix shell: error: symlink: File exists: "/bin/cc"' Thread-Index: AQHbJG5L59/e8aquQ0yJgARHXFYTIA== Date: Tue, 22 Oct 2024 10:49:32 +0000 Message-ID: Accept-Language: it-IT, en-US Content-Language: it-IT X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AS8PR10MB5829:EE_|PA1PR10MB8643:EE_ x-ms-office365-filtering-correlation-id: 34ef2ba2-07a0-4e70-dbdf-08dcf2873606 x-microsoft-antispam: BCL:0; ARA:14566002|15080799006|7092599003|8060799006|15030799003|8062599003|19110799003|461199028|102099032|440099028|3412199025; x-microsoft-antispam-message-info: SVIdyITlzTLEsIcUWDuYm+hwRoWvUNbuzfmZWtoxOY5nX5aAiDlopbAsbc160j+8PUf8xnUU+ewSA24LHcNYPMGdGevu8uec4VjVfUz3p2DveZvWQo5iLOQR5tGEkL8gI8fU70cacEu3tsX4WpexsWkF8me16UGjhk4+DyJFVoYyeL1UMbm2ylP6hnlOCq8iqF9bsEYteAFZjOahO8EqK5NMlQONxvoosvWmzfZZlJXH+SCkMlRn4DfJbxzSE1blkYK+gQ13eb4znModPQTRAR16aZ0RHAG++BKFCkqRWVBhrk/T0C44kkzNQIaTdHDTAH/C+2uMrQR2EiUN1CWZLjkPfMp/3No+sKDae0ON4ljTi/OBiva0ztFPlEq2yUxzzWWYWl8QfJW1levbF9qNi2p9MiagEGwzMI3llkDdKx6y6KKu6XQy86xh03wJmeLFuniKPzsgqv5+0NVZttdtazHIKJU0hBEQ4l1NIjZqQjyVGxN/tKouqPFelXBB/XlekeK+NR+aR3mL7Vc/tuheHzV5SewZAL2r+xqBotlMW69WvOxW407kw8HqO2/1zrIAuVdifb+8t2c/K/FtBwUzympgC7l5EVrthB2S62iQKf4PIJZ5YTRiBh0gLj1G48Cfse+Th3u2kUYUiA8sOXhExrynUQJcC0XL0IpRv2ZvCG6gA2v/NxhqaYvJfvNQVYIfQxmUbSnFInZoRbdCDBtn0NoVSHxnQtKG/i6F3VaJu+WcuW5JZtx4fGKZQWft2UVyWArRbAtVz2TALuveN7t5LQ== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?a8Ge9xgXk4aQZObAne5Pq7El/8f0Chfe3+Dj+wWTc8AzblOaBY4oehcyc1?= =?iso-8859-1?Q?I7D7FmqwKetc4vbg6W2Ltg2H5DMb5jYRzA2o30EpkvG1vPJp9OAqAWWgdT?= =?iso-8859-1?Q?iFuCFHXDhUOrIIsFEWVbW4UNisBgeiZTBb4L0MEh3vSDMajQdVLtO3tl9t?= =?iso-8859-1?Q?mCcC0VcwZR84LBsPvOAmRjWfT9eDO+fZh2zSUQyQN5+zpxn+IpUDa1m82p?= =?iso-8859-1?Q?Nn7JPNdGSoloPB+iiy4GSMt5VSpPJxbsQa7bTUvIF0S4UJccdQJAHxzs4I?= =?iso-8859-1?Q?YPkkt0RnMLqMs0GgT9nfygGcgDDZKOJu0J8zylzb5/SJBMfvITjdIEfruH?= =?iso-8859-1?Q?zTs0coym3kCUC6X2/pzVK6x0OsDt9GvNx4TdWeHAq2LAHMSNrf0EGWPLNH?= =?iso-8859-1?Q?58eV1ftQMk+lD8nlbKZQdPrguVWxxjJ//yowkL/0zssXSH4u5d/3jn/zsb?= =?iso-8859-1?Q?wsmLjVe87j6Scld1HiH7sWy007bwjmgvDHpGt53QWed4rUuv/YSLZ+DMsw?= =?iso-8859-1?Q?kkmOQvoJfhlA7awOVlV6R0sPBHhNs3hRudddGcUWa6tReo0LhQzORaAyKx?= =?iso-8859-1?Q?GxxNvuf0wqxaUedJb7hEN+yWejdO97BXpEkVzdvIazfc8pozYBTX+31Z1U?= =?iso-8859-1?Q?RA+kHjQGa124V4rdNsG7DtJl3Vxftb7xzLElp3Csnh8ZA/e9RPz42psuCd?= =?iso-8859-1?Q?2/6G0PnecVantn3Kb8lyQcELzjuQZFeHVNq1HaLJDllHp/qXrvgmMTz/d1?= =?iso-8859-1?Q?OfKjKS8qMvMXa+Na3IqWDp5XGeSJkphNs+ZaAypEpQyWJHwh51JwgQJHuP?= =?iso-8859-1?Q?z6UhqfszLNJ5DojqxO4o2j/Q7vixA6D91ZltlAtZJbUj++HK+5+s4KCPVK?= =?iso-8859-1?Q?z41gdG9Z1MY0HWtPLAQXzb9rl1ubZM1Rx6mBr3uz2zNxGIiIJlLUPKTMev?= =?iso-8859-1?Q?Tbi+iC/x0SJvcT23bgfvYJBsLh/Y4fpnkIM34M2r5PFHMufjclZD4I/j26?= =?iso-8859-1?Q?4DxKGsh1x/DG6dV5jaCH3HWarN2Hj2lMCFJQ1lEDNx0B1lj8OWHsAMAC23?= =?iso-8859-1?Q?ZwkhaiRyGSJGpsxoH6S9dWazaROtrX0fvSTa9y2MDbMavrzxvhb1ZOdHkE?= =?iso-8859-1?Q?mlrf7yh74ajM6Gw7NJyXJ+FtxC6KKPNTehbYzo+/ZzW8m/aiQoB8272nzR?= =?iso-8859-1?Q?v4e2H4phRUNgVyRgjAFKn9cctq2WdJxLwfyUzgJno7A3TSrPhrMmny5u7j?= =?iso-8859-1?Q?SH2L2sQA09IHjBattfHEwgvvWWuqZXmEpdCFYRsPA=3D?= Content-Type: multipart/alternative; boundary="_000_AS8PR10MB58291EBFC600E5EDCCB20C39F74C2AS8PR10MB5829EURP_" MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-7719-20-msonline-outlook-4359a.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AS8PR10MB5829.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 34ef2ba2-07a0-4e70-dbdf-08dcf2873606 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Oct 2024 10:49:32.0587 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR10MB8643 Received-SPF: pass client-ip=40.92.57.98; envelope-from=marco_fortina@hotmail.it; helo=EUR03-VI1-obe.outbound.protection.outlook.com X-Spam_score_int: -37 X-Spam_score: -3.8 X-Spam_bar: --- X-Spam_report: (-3.8 / 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, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=-1.699, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -1.72 X-Spam-Score: -1.72 X-Migadu-Queue-Id: 6D1CB46F17 X-TUID: 4FQZR08UEUCt --_000_AS8PR10MB58291EBFC600E5EDCCB20C39F74C2AS8PR10MB5829EURP_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable This patch closes issue when running "guix shell --container --emulate-fhs = clang-toolchain gcc-toolchain" or "guix shell --container --emulate-fhs cla= ng-toolchain gcc-toolchain": diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index a219b2ac89..37f11395f9 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -464,7 +464,8 @@ (define (setup-fhs profile) ;; /bin since that already has the sh symlink and the other (optional) F= HS ;; bin directories will link to /bin. (let ((gcc-path (string-append profile "/bin/gcc"))) - (if (file-exists? gcc-path) + (if (and (file-exists? gcc-path) + (not (file-exists? "/bin/cc"))) (symlink gcc-path "/bin/cc"))) ;; Guix's ldconfig doesn't search in FHS default locations, so provide a Cheers, Marco --_000_AS8PR10MB58291EBFC600E5EDCCB20C39F74C2AS8PR10MB5829EURP_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
This patch closes issue when running "guix shell --container --emulate= -fhs clang-toolchain gcc-toolchain" or "guix shell --container --= emulate-fhs clang-toolchain gcc-toolchain":


diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index a219b2ac89..37f11395f9 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -464,7 +464,8 @@ (define (setup-fhs profile)
   ;; /bin since that already has the sh symlink and the other (o= ptional) FHS
   ;; bin directories will link to /bin.
   (let ((gcc-path (string-append profile "/bin/gcc")))=
-    (if (file-exists? gcc-path)
+    (if (and (file-exists? gcc-path)
+             (not (file-exists? "/bin/c= c")))
         (symlink gcc-path "/bin/cc")))<= /div>
 
   ;; Guix's ldconfig doesn't search in FHS default locations, so= provide a


Cheers,
Marco
--_000_AS8PR10MB58291EBFC600E5EDCCB20C39F74C2AS8PR10MB5829EURP_-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 4B6zL0ydF2eDoQAAqHPOHw:P1 (envelope-from ) for ; Tue, 22 Oct 2024 12:40:44 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 4B6zL0ydF2eDoQAAqHPOHw (envelope-from ) for ; Tue, 22 Oct 2024 14:40:44 +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=Ge2TW2Dv; dkim=fail ("headers rsa verify failed") header.d=HOTMAIL.IT header.s=selector1 header.b=n5hvNRP8; 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=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=hotmail.it (policy=none) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1729600844; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: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=kCMDClm7G+kTuK8wO8VXNK2fny3tBDM94nB6yT0nxEY=; b=RznahwMvnxI4V56xO/ekIVlX1IugpBSarV3aR7WZUnXOPfrksbQZY+0YfJIC768UdqZcMS KIx2tSEgg72vFqYrVm3HQXumA2ilMfCrbn6ymI/auEHmx5N6b/jTZgsl4MplFkYh1g5KgG lpEpncM8kY6UDQmn2hg5mpFFdaOw8Q8s7/42WHgME+1uJYM2pHEWxjWNkXwNYoKb+3gZgN v6p3BuETD0ObahoZHVndb4kvQoH4onv0EknBefGSXVk5U4glc9wIHEyWpNWkLMVywmH81s pPmtkTbWd42FEMzmF+ioXkpfk4/yH92EvH14zecp5oPOh2sZNPVAgby5b6Nk1Q== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1729600844; a=rsa-sha256; cv=fail; b=aBk7i3M8NJ4sSh923HOXI8KrPXtcsTGlJk5oEcqH/cuyT3DvUnb1WUWgRPOrx4TDjF74MB rNTJR5HTB1yC+pStaxXHP8ggPbramYWK5mzQJ49cgm9XjuPAICLYv2IL/uMNi8oHqUlt2V WlAeF9K/Unc3t+h55bIzHKyem0RoP+lw2xlJKxrcDI9zVJ/+cs+1KTovz2QGdMubjgtXHC d5vmJfhg9eUL05cUf9uU4+l6uTGdSW7wICKUtnlwm2nsgsAMkxGQ/8iYU08x7Z5WCWABdk AWVetu7uR9rEMvuJhq20DeD9NnHlTofQrHQjrsoWFY0HuelxEmiQT2vlbywldA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=Ge2TW2Dv; dkim=fail ("headers rsa verify failed") header.d=HOTMAIL.IT header.s=selector1 header.b=n5hvNRP8; 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=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=hotmail.it (policy=none) 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 4C6C7140B for ; Tue, 22 Oct 2024 14:40:44 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3CwU-0004Iw-Sx; Tue, 22 Oct 2024 07:20:54 -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 1t3CwG-0004I0-MY for bug-guix@gnu.org; Tue, 22 Oct 2024 07:20:37 -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 1t3CwG-0005y3-57 for bug-guix@gnu.org; Tue, 22 Oct 2024 07:20:36 -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:In-Reply-To:References:Subject; bh=kCMDClm7G+kTuK8wO8VXNK2fny3tBDM94nB6yT0nxEY=; b=Ge2TW2DvhKD/ONJx73K8ae2jD451P2BKj1iQEUmGalFvwabWkWZEa2YpKDwc6K/+xtv4NHskvqCcw18xXNd/WTCAYj7GqKDudR1WVbU3Fw6shCXpkFY5lmwDpUoED58WLgfC3QTXjLyQyJfFdvBAYLkz21Wz/Ve8Z0tCPok/lPZtfga+1wIQsO3+zLM749hP7H6otdIC3YllAZBmDO/Pi2eYVzI1EqpaLn5cjxFKEUxpfMq4VcRSlmYLZ054O2pbG+9V1xR986QYJaLBipQnOeXMuQfpuIsCf3vytXBmGizkTJatyQuRWt0vr34tYpjtl/o442j5ggeR4tU9ASeS6w==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t3Cwh-0005Ke-HP for bug-guix@gnu.org; Tue, 22 Oct 2024 07:21:03 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#62917: [bug#73799] [PATCH] Fix 'guix shell: error: symlink: File exists: "/bin/cc"' References: <2085439243.1521663.1681776855547@privateemail.com> In-Reply-To: <2085439243.1521663.1681776855547@privateemail.com> Resent-From: Marco Fortina Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 22 Oct 2024 11:21:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62917 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: "guix-patches@gnu.org" , "guix-devel@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.172959602620067 (code B ref -1); Tue, 22 Oct 2024 11:21:03 +0000 Received: (at submit) by debbugs.gnu.org; 22 Oct 2024 11:20:26 +0000 Received: from localhost ([127.0.0.1]:54817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t3Cw6-0005DV-Ao for submit@debbugs.gnu.org; Tue, 22 Oct 2024 07:20:26 -0400 Received: from lists.gnu.org ([209.51.188.17]:36744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t3CSm-0003r4-KU for submit@debbugs.gnu.org; Tue, 22 Oct 2024 06:50:10 -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 1t3CSG-0006Fa-VA; Tue, 22 Oct 2024 06:49:37 -0400 Received: from mail-vi1eur03olkn2098.outbound.protection.outlook.com ([40.92.57.98] helo=EUR03-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t3CSF-0000kW-6A; Tue, 22 Oct 2024 06:49:36 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XLzKAT8oP0Xw8N/+08rpuu0hDfpWo65XWaCirCfa1+VyeLnOqE9GkQ6IswrjSZrwcRlaqpo1UHojl/as1jFLhPfuNj0ff/05UFrYBkbVBMEGIR3IU9nvXTWNXEFTjRV8hMV+NLliX/vEkIeMJVHC4DhK5E57ShagjteuRAwE56Nw2YRPq/gXdT9m0xcSTSlRVN69CerlvHwlcejD5tMrwWLZ6VtyoxjSV25XYV/ZbolN4oKdiHXGHWpbNAM1tO6zJr/Ajsw9VXi7zJKcKwUkau3602KfhrfLrPQxCMzoB/sv5GqCl8uLi1nGpvLDr2C9GTOxI/sDFZyTrXewO7ZfxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kCMDClm7G+kTuK8wO8VXNK2fny3tBDM94nB6yT0nxEY=; b=fB4LbZO4yvOOrUS3NvsrNLbkTBs8MBme8xsiqK5vZN1mrAQiJXbzKtdIMjLMXGs0J/bM0WBzwG07qWe4LWwCWkNia0Lf+dT8hd1tmkC+d9/TlTY1FFZA2qFvgSpeTVHU2evmqSGpqSsQcs6ZI1263jEPVhY/H2e2m2qWt8T/pcKvHJ/iiQ4+tQJPcGyEzbrZwEJdUz8T48kdcMe68cL5S3rhtdoDweUjYWY6NWUl95ztJYdK4TCKrL+7PMCpy0CMkHZ1nUyhd6143BxtF5Bkp6n36unmRoKmlS2Y6Uke0ShyWX85Q+EDzu8wTdOoQgspNHd7dM3d3MaKJ/6du31ySA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=HOTMAIL.IT; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kCMDClm7G+kTuK8wO8VXNK2fny3tBDM94nB6yT0nxEY=; b=n5hvNRP8VVy4nlyBvA3QaHd1WKbHdvg0n7wW0oRm9j8wc9mIkbIHZqMtWPsh5mtGgwgfKSKvTLcw+nfTmwHPF+dyg0dtk3+BAyZXFQwd0vWEBFgOrETt7jl7wUUCLXNyuoCosXWOJuvlJqaHYj9zxfA4fVdnR/TS8VgALIgyDH2C0IF4jL4vuAHbAEnQR36AvOUw+JQ1DxkxQwC0h5VkKTw1wE8hiK9JegGf2seJ7XTKV7T3aViCBg+nv8aRSj0bBwtVEZfpeeN04BVmGRpPaTXP0R6j6Tb6bWORZ5wJbUsbz7t9gk992OYnKP0tjtH+rlrFb8PKGB7A3Z9tUIj8jQ== Received: from AS8PR10MB5829.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:525::9) by PA1PR10MB8643.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:443::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Tue, 22 Oct 2024 10:49:32 +0000 Received: from AS8PR10MB5829.EURPRD10.PROD.OUTLOOK.COM ([fe80::a705:2fe4:69df:1e30]) by AS8PR10MB5829.EURPRD10.PROD.OUTLOOK.COM ([fe80::a705:2fe4:69df:1e30%6]) with mapi id 15.20.8093.014; Tue, 22 Oct 2024 10:49:32 +0000 From: Marco Fortina Thread-Topic: [bug#62917] [bug#73799] [PATCH] Fix 'guix shell: error: symlink: File exists: "/bin/cc"' Thread-Index: AQHbJG5L59/e8aquQ0yJgARHXFYTIA== Date: Tue, 22 Oct 2024 10:49:32 +0000 Message-ID: Accept-Language: it-IT, en-US Content-Language: it-IT X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AS8PR10MB5829:EE_|PA1PR10MB8643:EE_ x-ms-office365-filtering-correlation-id: 34ef2ba2-07a0-4e70-dbdf-08dcf2873606 x-microsoft-antispam: BCL:0; ARA:14566002|15080799006|7092599003|8060799006|15030799003|8062599003|19110799003|461199028|102099032|440099028|3412199025; x-microsoft-antispam-message-info: SVIdyITlzTLEsIcUWDuYm+hwRoWvUNbuzfmZWtoxOY5nX5aAiDlopbAsbc160j+8PUf8xnUU+ewSA24LHcNYPMGdGevu8uec4VjVfUz3p2DveZvWQo5iLOQR5tGEkL8gI8fU70cacEu3tsX4WpexsWkF8me16UGjhk4+DyJFVoYyeL1UMbm2ylP6hnlOCq8iqF9bsEYteAFZjOahO8EqK5NMlQONxvoosvWmzfZZlJXH+SCkMlRn4DfJbxzSE1blkYK+gQ13eb4znModPQTRAR16aZ0RHAG++BKFCkqRWVBhrk/T0C44kkzNQIaTdHDTAH/C+2uMrQR2EiUN1CWZLjkPfMp/3No+sKDae0ON4ljTi/OBiva0ztFPlEq2yUxzzWWYWl8QfJW1levbF9qNi2p9MiagEGwzMI3llkDdKx6y6KKu6XQy86xh03wJmeLFuniKPzsgqv5+0NVZttdtazHIKJU0hBEQ4l1NIjZqQjyVGxN/tKouqPFelXBB/XlekeK+NR+aR3mL7Vc/tuheHzV5SewZAL2r+xqBotlMW69WvOxW407kw8HqO2/1zrIAuVdifb+8t2c/K/FtBwUzympgC7l5EVrthB2S62iQKf4PIJZ5YTRiBh0gLj1G48Cfse+Th3u2kUYUiA8sOXhExrynUQJcC0XL0IpRv2ZvCG6gA2v/NxhqaYvJfvNQVYIfQxmUbSnFInZoRbdCDBtn0NoVSHxnQtKG/i6F3VaJu+WcuW5JZtx4fGKZQWft2UVyWArRbAtVz2TALuveN7t5LQ== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: a8Ge9xgXk4aQZObAne5Pq7El/8f0Chfe3+Dj+wWTc8AzblOaBY4oehcyc1I7D7FmqwKetc4vbg6W2Ltg2H5DMb5jYRzA2o30EpkvG1vPJp9OAqAWWgdTiFuCFHXDhUOrIIsFEWVbW4UNisBgeiZTBb4L0MEh3vSDMajQdVLtO3tl9tmCcC0VcwZR84LBsPvOAmRjWfT9eDO+fZh2zSUQyQN5+zpxn+IpUDa1m82pNn7JPNdGSoloPB+iiy4GSMt5VSpPJxbsQa7bTUvIF0S4UJccdQJAHxzs4IYPkkt0RnMLqMs0GgT9nfygGcgDDZKOJu0J8zylzb5/SJBMfvITjdIEfruHzTs0coym3kCUC6X2/pzVK6x0OsDt9GvNx4TdWeHAq2LAHMSNrf0EGWPLNH58eV1ftQMk+lD8nlbKZQdPrguVWxxjJ//yowkL/0zssXSH4u5d/3jn/zsbwsmLjVe87j6Scld1HiH7sWy007bwjmgvDHpGt53QWed4rUuv/YSLZ+DMswkkmOQvoJfhlA7awOVlV6R0sPBHhNs3hRudddGcUWa6tReo0LhQzORaAyKxGxxNvuf0wqxaUedJb7hEN+yWejdO97BXpEkVzdvIazfc8pozYBTX+31Z1URA+kHjQGa124V4rdNsG7DtJl3Vxftb7xzLElp3Csnh8ZA/e9RPz42psuCd2/6G0PnecVantn3Kb8lyQcELzjuQZFeHVNq1HaLJDllHp/qXrvgmMTz/d1OfKjKS8qMvMXa+Na3IqWDp5XGeSJkphNs+ZaAypEpQyWJHwh51JwgQJHuPz6UhqfszLNJ5DojqxO4o2j/Q7vixA6D91ZltlAtZJbUj++HK+5+s4KCPVKz41gdG9Z1MY0HWtPLAQXzb9rl1ubZM1Rx6mBr3uz2zNxGIiIJlLUPKTMevTbi+iC/x0SJvcT23bgfvYJBsLh/Y4fpn kIM34M2r5PFHMufjclZD4I/j264DxKGsh1x/DG6dV5jaCH3HWarN2Hj2lMCFJQ1lEDNx0B1lj8OWHsAMAC23ZwkhaiRyGSJGpsxoH6S9dWazaROtrX0fvSTa9y2MDbMavrzxvhb1ZOdHkEmlrf7yh74ajM6Gw7NJyXJ+FtxC6KKPNTehbYzo+/ZzW8m/aiQoB8272nzRv4e2H4phRUNgVyRgjAFKn9cctq2WdJxLwfyUzgJno7A3TSrPhrMmny5u7jSH2L2sQA09IHjBattfHEwgvvWWuqZXmEpdCFYRsPA= Content-Type: multipart/alternative; boundary="_000_AS8PR10MB58291EBFC600E5EDCCB20C39F74C2AS8PR10MB5829EURP_" MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-7719-20-msonline-outlook-4359a.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AS8PR10MB5829.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 34ef2ba2-07a0-4e70-dbdf-08dcf2873606 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Oct 2024 10:49:32.0587 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR10MB8643 Received-SPF: pass client-ip=40.92.57.98; envelope-from=marco_fortina@hotmail.it; helo=EUR03-VI1-obe.outbound.protection.outlook.com X-Spam_score_int: -37 X-Spam_score: -3.8 X-Spam_bar: --- X-Spam_report: (-3.8 / 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, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=-1.699, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 22 Oct 2024 07:20:23 -0400 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-Spam-Score: 1.00 X-Spam-Score: 1.00 X-Migadu-Queue-Id: 4C6C7140B X-Migadu-Scanner: mx13.migadu.com X-TUID: sNZMiUhIgawm Message-ID: <20241022104932.c7PUBI_Jcw0A2CKlcewtwLRJicCzcF8CvoboGyBn6OM@z> --_000_AS8PR10MB58291EBFC600E5EDCCB20C39F74C2AS8PR10MB5829EURP_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable This patch closes issue when running "guix shell --container --emulate-fhs = clang-toolchain gcc-toolchain" or "guix shell --container --emulate-fhs cla= ng-toolchain gcc-toolchain": diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index a219b2ac89..37f11395f9 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -464,7 +464,8 @@ (define (setup-fhs profile) ;; /bin since that already has the sh symlink and the other (optional) F= HS ;; bin directories will link to /bin. (let ((gcc-path (string-append profile "/bin/gcc"))) - (if (file-exists? gcc-path) + (if (and (file-exists? gcc-path) + (not (file-exists? "/bin/cc"))) (symlink gcc-path "/bin/cc"))) ;; Guix's ldconfig doesn't search in FHS default locations, so provide a Cheers, Marco --_000_AS8PR10MB58291EBFC600E5EDCCB20C39F74C2AS8PR10MB5829EURP_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
This patch closes issue when running "guix shell --container --emulate= -fhs clang-toolchain gcc-toolchain" or "guix shell --container --= emulate-fhs clang-toolchain gcc-toolchain":


diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index a219b2ac89..37f11395f9 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -464,7 +464,8 @@ (define (setup-fhs profile)
   ;; /bin since that already has the sh symlink and the other (o= ptional) FHS
   ;; bin directories will link to /bin.
   (let ((gcc-path (string-append profile "/bin/gcc")))=
-    (if (file-exists? gcc-path)
+    (if (and (file-exists? gcc-path)
+             (not (file-exists? "/bin/c= c")))
         (symlink gcc-path "/bin/cc")))<= /div>
 
   ;; Guix's ldconfig doesn't search in FHS default locations, so= provide a


Cheers,
Marco
--_000_AS8PR10MB58291EBFC600E5EDCCB20C39F74C2AS8PR10MB5829EURP_--