From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 gBRfG1Gxr2IqAAAAbAwnHQ (envelope-from ) for ; Mon, 20 Jun 2022 01:29:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id GJg+G1Gxr2JdgAEA9RJhRA (envelope-from ) for ; Mon, 20 Jun 2022 01:29:21 +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 ABB12A5ED for ; Mon, 20 Jun 2022 01:29:20 +0200 (CEST) Received: from localhost ([::1]:35052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o34M3-0002ac-1o for larch@yhetil.org; Sun, 19 Jun 2022 19:29:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47220) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o34Ln-0002Z2-QX for guix-patches@gnu.org; Sun, 19 Jun 2022 19:29:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59542) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o34Ln-0001uv-HA for guix-patches@gnu.org; Sun, 19 Jun 2022 19:29:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o34Ln-00013X-EJ for guix-patches@gnu.org; Sun, 19 Jun 2022 19:29:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55920] [PATCH] build-system: chicken: Added stamp-egg-version phase References: <20220612004520.6107-1-michal_atlas@posteo.net> In-Reply-To: <20220612004520.6107-1-michal_atlas@posteo.net> Resent-From: Michal Atlas Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 19 Jun 2022 23:29:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55920 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch moreinfo To: 55920@debbugs.gnu.org Cc: Michal Atlas Received: via spool by 55920-submit@debbugs.gnu.org id=B55920.16556813213987 (code B ref 55920); Sun, 19 Jun 2022 23:29:03 +0000 Received: (at 55920) by debbugs.gnu.org; 19 Jun 2022 23:28:41 +0000 Received: from localhost ([127.0.0.1]:53434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o34LP-00012B-CQ for submit@debbugs.gnu.org; Sun, 19 Jun 2022 19:28:41 -0400 Received: from mout02.posteo.de ([185.67.36.66]:35209) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o32Xc-0002KK-Gs for 55920@debbugs.gnu.org; Sun, 19 Jun 2022 17:33:11 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 3A9CD240108 for <55920@debbugs.gnu.org>; Sun, 19 Jun 2022 23:33:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1655674382; bh=3eof8fMg8Lar//ZQ1VN5CX6JecBSOAzGT2CK8lw81bM=; h=From:To:Cc:Subject:Date:From; b=lpfbh5Gttm6u3E1gY25DG2FxQiTm2eYblom51vDicChFoZJPCUHNvNzcMLEflic6c H1rk2R1jEXHSyYrvpfiSoVv1FqPQHmKGHxeS66xzdfS7I6C0AztToaTuElnCJ9sfVT 1tz+gh23tglmZh/DJ+zIiYPtDBEACInZ+0WW/rBYvorOwiOtlblByoel4YR1DIqQaf kaR8b/m4khTEwirRh1/grH+o5GVIQPaxs0OIZ031d8L9dR+easyNPYVONzxYUGTga+ zm2DMQ4KsymQJ1/4H6l+Nkk7OQGxjubCZJg1RTxykYt5gfGFyVifogpj/NqUPH+S1X Y3nD/St/PMUXw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LR5bx3blQz6tnw; Sun, 19 Jun 2022 23:33:01 +0200 (CEST) From: Michal Atlas Date: Sun, 19 Jun 2022 20:36:03 +0000 Message-Id: <20220619203602.10903-1-michal_atlas@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Sun, 19 Jun 2022 19:28:38 -0400 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 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=1655681361; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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=ZMa7kPUxZWwvb2bgQRtAO6ySXU8z2Lu4sqHCsvfTOKM=; b=oispZ4EgXlUrvnsxLACVpuGMOZsFDEB+1GHKuEKQimdMsMbpCLPpPWK8EZ/bDnVdMznRME Whqu01C6/frxwx9U+kV+PL+61A9fZgyKYV00E/kX0CpxqgigMU4pzyilTeLof4QwmbRGjF YxnCzbpupgMQmEXBW6FdkXv+Sli56WgWRUymM5DzyzYkk7KqItLwwjObdxVV2M8oai1Mog zlHCdll1+tmVxrmcT8C0o3nqZZzY6CJ/C75npyGtflh2VkJ93elAbRvquiJQLaiWCi2ASI LqRv6xCyj3xKo7qp27/3ajnTmF/G4+3+qeEJc+bp3faouFqa/oPIVQedieLPuA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655681361; a=rsa-sha256; cv=none; b=jAAS2gducOoExS+DqD/yuNmp2F/ueDxcFF8sGdnaITQFhjH4M/gK2RtJxkJE+5/52zmQJe lQIfaD/ln98uwonoMXOZW0KhA0mM46b/AsMosAJwLki7cAJH0eS+twQao/+vMqTzOBy1g5 wwfxCh3Gkyz7PukoBeYRG7y8HwgaUJLizQwIrHtEnjSIGxLpoU3exJgI9ONPtSNLoyIApE AD/IhA7/YjyjvlPVIWzTa0uG+5uSKOTwOr43CJOxiTaiCdsb+v9leRcCCgvOeqf4uWYLi5 BlHOlFMIB7iR0w0ABYpXPq3rvzTiJT18igmdvAqcRVgqt4IxiGse0wy0CzbR3g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=lpfbh5Gt; 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: 7.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=lpfbh5Gt; 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: ABB12A5ED X-Spam-Score: 7.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: /no5FHNwNeAz * guix/build/chicken-build-system.scm (stamp-egg-version): New phase Compiled eggs will now always contain some version, falling back to the guix package version if none is provided by the egg. (%standard-phases): Inserted the new phase --- Many .egg files don't contain version information, this causes `chicken-install` to label them as "unknown", which causes it to fail compilations whenever a dependency is tagged with a minimum-version. I am unaware of a way to disable the version check 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..c0a4986032 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* (stamp-egg-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 (lambda (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 + (lambda (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 'stamp-egg-version stamp-egg-version) (replace 'build build) (delete 'check) (replace 'install install) -- 2.36.1 --- Hopefully I understood your comments well. > Note that 'insert-missing-version will always be logged I was aware of that but didn't find anything about making a phase optional, good thing it has a more sensible name now. Cheers