From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 2DdZAKjwpWI4FwEAbAwnHQ (envelope-from ) for ; Sun, 12 Jun 2022 15:56:56 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id EGwzAKjwpWL/MQEAauVa8A (envelope-from ) for ; Sun, 12 Jun 2022 15:56:56 +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 CE219213BC for ; Sun, 12 Jun 2022 15:56:55 +0200 (CEST) Received: from localhost ([::1]:51218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0O5G-0003sz-C4 for larch@yhetil.org; Sun, 12 Jun 2022 09:56:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42094) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0IR4-0000FN-8l for guix-patches@gnu.org; Sun, 12 Jun 2022 03:55:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60714) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o0IR4-0005KU-0v for guix-patches@gnu.org; Sun, 12 Jun 2022 03:55:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o0IR4-0003W2-0k for guix-patches@gnu.org; Sun, 12 Jun 2022 03:55:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55920] [PATCH] build-system: chicken: Added insert-missing-version phase Resent-From: Michal Atlas Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 12 Jun 2022 07:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55920 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55920@debbugs.gnu.org Cc: Michal Atlas X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165502045113447 (code B ref -1); Sun, 12 Jun 2022 07:55:01 +0000 Received: (at submit) by debbugs.gnu.org; 12 Jun 2022 07:54:11 +0000 Received: from localhost ([127.0.0.1]:54611 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0IQB-0003Ul-W7 for submit@debbugs.gnu.org; Sun, 12 Jun 2022 03:54:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:40766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0BlA-0000d2-W9 for submit@debbugs.gnu.org; Sat, 11 Jun 2022 20:47:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0BlA-00009K-Fz for guix-patches@gnu.org; Sat, 11 Jun 2022 20:47:20 -0400 Received: from mout01.posteo.de ([185.67.36.65]:54669) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0Bl8-0007vR-DE for guix-patches@gnu.org; Sat, 11 Jun 2022 20:47:20 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 0022F240026 for ; Sun, 12 Jun 2022 02:47:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1654994835; bh=iZMZIe7mrPQNr9pljDgH4PoOr34UUO5J036wV0Z9cW8=; h=From:To:Cc:Subject:Date:From; b=j9sF/86Cz0ONfuCL7r8N16J0bd7bPny7kigR7TIJXuha/6P0PGjiZaA289COR9lbF FcVH105wO9ez2RLd3JbS6WGCRFTihujbik11p2If8NHhODs40veaNYT7HtTQRsVbCN c3dwRlRIGrKoLAlPiYIIrO1L3QNosEMw6qFhF12giDK9DH1WzDh+iGDPojK8oVt6hf OFr85nwrb/meju91y97JScQIj0JlVYmyFuPlIYk+yNT/P6UuH7A1pzfBFnxGrHot98 TTrGsjeQEiXTpPD/pWdHHSS7ACg9knkasrnYOb+yGBhZ3Y/dK5+z47YRfO/0Opj105 oQulyoBJj47BQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LLGHk2klnz6tmT; Sun, 12 Jun 2022 02:47:14 +0200 (CEST) From: Michal Atlas Date: Sun, 12 Jun 2022 00:45:20 +0000 Message-Id: <20220612004520.6107-1-michal_atlas@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.67.36.65; envelope-from=michal_atlas@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 12 Jun 2022 03:54:07 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sun, 12 Jun 2022 09:56:23 -0400 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 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=1655042215; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=3TTnmLPfBRWC+yMSFud0WmTZNQLQ47/voPT08m5ADb0=; b=dEXp4or6eZUVKOTCLdJ+tKAKvq6FNwC2CzyKj3R/g7kBbLCi+nTfDuv29EUTD8kycmC1Up P7t0hOuj2pWAxUNWjtsmnXUX8fE3C8I30ostH58TdZtgBuOL5xbeozJkvi7CCFkBIx+DPW 3G93CCzWh+NoN06R+GMCfoJeMYZmEfZELJxvCiFIXtN2df17g73EIxFsbhrfm6/7XsHjGu 7MxKlwEc/deJZ8YUzt3gTcP751n7oNICPZNPTxtdeQXFm7Fv9a96eVNhH4ze4zESuuG5qL fHRf1+ap116k7qu7d2mXdKpnvRNzzA5UGcQ//CBZszfPh3QNx71RR6U0/W3lrA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655042215; a=rsa-sha256; cv=none; b=IbpRINF/3PII58FCJ35dVkG6nifcTIoS5UoVlrA5SXW7ho/MjYXgxE2T6/8jA5e/DAFmSq +d+UUTbH4oNSl+thBVaZRJ8fwfEeBLjoPYgXrNH7V//To8O8pxd9eGAwan9QwlwiDmZWVa RXItzd6kw325T3+J9vZsVGGz9hFmcw4HvOxiVXm4E+5ROm06lVIKhInyAMYbwyjEsVo7X/ ukZ/6QFK+5hQGQAoo0F0sh8CRp4nyaZXJlAsHGZCvjIF+MB4y6Fyo+ut72YdW9Hcc32cp5 1fPrraTmn2hUn7pRJzXSMfLsdUMwvkPeS7OGP4hvsBPyx0LrvmWfGNhrkfrAGw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b="j9sF/86C"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 6.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b="j9sF/86C"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: CE219213BC X-Spam-Score: 6.31 X-Migadu-Scanner: scn0.migadu.com X-TUID: GSjdgfSX+bnW Many .egg files don't contain version information, this causes `chicken-install` to label them {unknown}, which makes it fail compilations whenever a dependency is tagged with a minimum-version. I am unaware of a way to force this check to not-happen and the version information should be included anyway, so this patch should fix the problem. --- guix/build/chicken-build-system.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/guix/build/chicken-build-system.scm b/guix/build/chicken-build-system.scm index 5db9906acf..341ab64a0f 100644 --- a/guix/build/chicken-build-system.scm +++ b/guix/build/chicken-build-system.scm @@ -112,6 +112,17 @@ (define* (check #:key egg-name tests? #:allow-other-keys) (when tests? (invoke "chicken-install" "-cached" "-test" "-no-install" egg-name))) +(define* (insert-missing-version #:key egg-name name #:allow-other-keys) + "Inserts version information into the .egg file if it isn't contained already" + (let* ([filename (string-append egg-name "/" egg-name ".egg")] + [egg-info (call-with-input-file filename read)] + [ver? (find (λ (i) (eqv? (car i) 'version)) egg-info)] + [ver (substring name (1+ (string-rindex name #\-)))]) + (when (not ver?) + (make-file-writable filename) + (call-with-output-file filename + (λ (f) (write (cons `(version ,ver) egg-info) f)))))) + ;; It doesn't look like Chicken generates any unnecessary references. ;; So we don't have to remove them either. Nice. @@ -122,6 +133,7 @@ (define %standard-phases (delete 'configure) (delete 'patch-generated-file-shebangs) (add-before 'unpack 'setup-chicken-environment setup-chicken-environment) + (add-before 'build 'insert-missing-version insert-missing-version) (replace 'build build) (delete 'check) (replace 'install install) base-commit: 1643402950b2d2384ec74fb69e059cc6a4c4ebed -- 2.36.1