From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cNqmE6Kg7WAP2gAAgWs5BA (envelope-from ) for ; Tue, 13 Jul 2021 16:18:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 6FloD6Kg7WCQRgAAB5/wlQ (envelope-from ) for ; Tue, 13 Jul 2021 14:18:10 +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 DC8D026D23 for ; Tue, 13 Jul 2021 16:18:09 +0200 (CEST) Received: from localhost ([::1]:37026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3JEe-0000ta-9X for larch@yhetil.org; Tue, 13 Jul 2021 10:18:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3IlW-000413-P1 for guix-patches@gnu.org; Tue, 13 Jul 2021 09:48:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56558) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m3IlW-00010n-Hi for guix-patches@gnu.org; Tue, 13 Jul 2021 09:48:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m3IlW-0007cX-7y for guix-patches@gnu.org; Tue, 13 Jul 2021 09:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49025] [PATCH v5 01/20] utils: Define target-linux? predicate. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 13 Jul 2021 13:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49025 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Mathieu Othacehe Cc: 49025@debbugs.gnu.org Received: via spool by 49025-submit@debbugs.gnu.org id=B49025.162618402329214 (code B ref 49025); Tue, 13 Jul 2021 13:48:02 +0000 Received: (at 49025) by debbugs.gnu.org; 13 Jul 2021 13:47:03 +0000 Received: from localhost ([127.0.0.1]:39867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3IkZ-0007b7-Kl for submit@debbugs.gnu.org; Tue, 13 Jul 2021 09:47:03 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:36114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3IkX-0007af-BO for 49025@debbugs.gnu.org; Tue, 13 Jul 2021 09:47:02 -0400 Received: from butterfly.local ([5.23.188.225]) by michel.telenet-ops.be with bizsmtp id Udmy2500a4sDL4M06dmzdr; Tue, 13 Jul 2021 15:46:59 +0200 Message-ID: <8bff8c5fe05c3fe26dcf1a748881f733c32ff2b9.camel@telenet.be> From: Maxime Devos In-Reply-To: <87y2abhfqa.fsf@gnu.org> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> <20210711114723.27568-2-maximedevos@telenet.be> <87y2abhfqa.fsf@gnu.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-erWrTpJ4+X2QMDnYhBns" Date: Tue, 13 Jul 2021 15:33:26 +0200 MIME-Version: 1.0 User-Agent: Evolution 3.34.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626184019; bh=Ata7zrpGa4V8oldYluXztdOHiAu/buFbl3JzgAJ1SR8=; h=Subject:From:To:Cc:In-Reply-To:References:Date; b=R6HRIz9tvDMxJdVuKgKIjsQcZeDQqT6MK+PCZ7poiJnz1TCDrTlCKhJ/9YEJo/3xZ BLDAF6w5gkL/3Q6DwhdWGlF9/+GFjnWhMHQubPOSBwTkaUpdGNDVdRZSk6PdL62DHU HNw1pUfazhbrWdhfjvgMo7cizb9ZBfvWBIejeVpDsL8v5+yb0pFlKxsf8+AK30BHu0 c8oHRnU2oKo9QYvCR28Qn7QCj3YT7w+Lj03x+I4EpNzuXh1wA0DnHk1uWkALDqGI1+ KqBB5WTTxJoHp8dGMw225FBC2vAoyYaDzf7KQZtLzhUpmXAiyIlqZLX9M/RiPm3ewh Miqf1GjZH3Y5Q== 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=1626185889; 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:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=Ata7zrpGa4V8oldYluXztdOHiAu/buFbl3JzgAJ1SR8=; b=TBUf9jEwDDPb5NHYGLwb+75e9LnJe3Xa96xY9dkD4YKVopg0DjK1HE+Fv/MGtx1KLJQUQv qir1jMYvSxqXRDIehfWmedtn/NlwEOS4oGqGa8yL6PCyeTerLh06COxaw+LyHfjB9bQfOT JuXb2iUUMQYyCQrMM0YngpjG53kRqvXmTZfQjG2+L1gimf4Z9DUBlGzq8YlqtcTh9zJPuy EYnPzEG4ceq5sChe/nce+W4l+D2jEZGMWpaPiwWBwQo/iuaowO107yFeWVT731vwBpcKPw Pgp3CM1uMITXmgRNHtClrI20zpMQZDn05qlJqg6jHoKGFG0DnRFv8soq4++81w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626185889; a=rsa-sha256; cv=none; b=S05pQe307wds2HLSCIo0BtiNJWnl23kPBXeR7HUoX9OsVZ94uhfML7knZj2KyVwcmmciti XBRCfJ00DgiNnzhIHQp/VyHYGrjknqcdrASu/5g5F1AS8eaCY4qMmcs4gMizG5tf8ffFzz Cd4K33egqbFFstyN9vyScCF9rXWRHEK2ESsLXv/C4zXelbdULL5Y8sTWsbvsYC7B9LdbxQ QQU2mkPpNZerPt7GD9yjwCmUpqj1w4AKIJhc2iQb94YkH8E5qaDmh/lX0m35UgETYw8Fqz 4hM4VrPPp+7s3tIO/H7Mw2qDi+5CdALnmsHbfEDVHvmZTvoWirFsbLWNR9lgng== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=R6HRIz9t; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); 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: -1.90 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=R6HRIz9t; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); 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: DC8D026D23 X-Spam-Score: -1.90 X-Migadu-Scanner: scn0.migadu.com X-TUID: oOXfU8ZvZkoA --=-erWrTpJ4+X2QMDnYhBns Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Mathieu Othacehe schreef op ma 12-07-2021 om 14:35 [+0200]: > Hey, >=20 > > +(define* (target-linux? #:optional (target (or (%current-target-system= ) > > + (%current-system)))) >=20 > You can add a docstring here, something like: >=20 > "Is the operating system of TARGET Linux?" The Linux kernel by itself doesn't make an operating system, as the kernel doesn't have a package manager, display manager, basic text editors, application to configure network connections ..., so I made this=20 "Does the operating system of TARGET use the Linux kernel?" > > + (string-contains target "linux")) >=20 > You should use the "->bool" procedure to return a boolean here. Done in v5. > > (define* (target-mingw? #:optional (target (%current-target-system))) >=20 > You can add a docstring, something like: >=20 > "Is the operating system of TARGET Windows 32 bits?" Done in v5, but I dropped the '32-bits' and added a comment: ;; The "-32" doesn't mean TARGET is 32-bit, as "x86_64-w64-mingw32" ;; is a valid triplet (see the (gnu ci) module) and 'w64' and 'x86_6= 4' ;; are 64-bit. I wouldn't know what the "32" in "mingw32" refers to. > > + (map (compose ->bool target-linux?) >=20 > target-linux? should return a boolean >=20 > > +(test-equal "target-mingw?" > > + '(#f #f #t) > > + (map (compose ->bool target-mingw?) >=20 > You can write: >=20 > --8<---------------cut here---------------start------------->8--- > (map target-mingw? > '("i686-linux-gnu" "i686-pc-gnu" "i686-w64-mingw32"))) > --8<---------------cut here---------------end--------------->8--- >=20 > here. Done in v5. I'll send the v5 once everything is tested again and commits have been properly rebased. Greetings, Maxime. --=-erWrTpJ4+X2QMDnYhBns Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYO2WIBccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7gvoAP9RuTiN755YbvX2lNBbyAHCrZnF 3FAOglpSV6keRf5bowD/a89HQMt0koKvaeBHSypW+zuUvpWmeDEnchser7WyAgQ= =iMQa -----END PGP SIGNATURE----- --=-erWrTpJ4+X2QMDnYhBns--