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 8KE0ERrCqWKzIAAAbAwnHQ (envelope-from ) for ; Wed, 15 Jun 2022 13:27:22 +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 sIMfERrCqWJDVQEA9RJhRA (envelope-from ) for ; Wed, 15 Jun 2022 13:27:22 +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 E8B3C1A331 for ; Wed, 15 Jun 2022 13:27:21 +0200 (CEST) Received: from localhost ([::1]:55194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1RBA-0000U8-SW for larch@yhetil.org; Wed, 15 Jun 2022 07:27:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38250) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1RAs-0000RU-P1 for guix-patches@gnu.org; Wed, 15 Jun 2022 07:27:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42748) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1RAs-0005sj-Fp for guix-patches@gnu.org; Wed, 15 Jun 2022 07:27:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o1RAs-00045I-94 for guix-patches@gnu.org; Wed, 15 Jun 2022 07:27:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55920] [PATCH] build-system: chicken: Added insert-missing-version phase Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 Jun 2022 11:27:02 +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 To: Michal Atlas , 55920@debbugs.gnu.org Received: via spool by 55920-submit@debbugs.gnu.org id=B55920.165529239715666 (code B ref 55920); Wed, 15 Jun 2022 11:27:02 +0000 Received: (at 55920) by debbugs.gnu.org; 15 Jun 2022 11:26:37 +0000 Received: from localhost ([127.0.0.1]:36644 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1RAS-00044c-UV for submit@debbugs.gnu.org; Wed, 15 Jun 2022 07:26:37 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:16803) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1RAN-00044Q-OQ for 55920@debbugs.gnu.org; Wed, 15 Jun 2022 07:26:35 -0400 Received: from lprikler-laptop.ist.intra (gw.ist.tugraz.at [129.27.202.101]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4LNNKw4SSgz1LZWB; Wed, 15 Jun 2022 13:26:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4LNNKw4SSgz1LZWB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1655292388; bh=a8rOx7Vadg/SFJi9pnBV4W0hK780NjNNRTetSkBQ0q8=; h=Subject:From:To:Date:In-Reply-To:References:From; b=oQ6U18sHXr+if4MIk3YLZlwXHz9iuXCE/m8bTqdkfZvtNH4+osmic3d0Q0WXxwoV/ xkIyeE6K0xMPN865G0Oh3huyKkJIlnTv+gjJjNqSI+uOWfI1jiUDPAlPQfhzon5HG/ 3jw1H6MMUDsvqcpArLMljYs0UAL1gQUmdcqeMZmg= Message-ID: From: Liliana Marie Prikler Date: Wed, 15 Jun 2022 13:26:27 +0200 In-Reply-To: <20220612004520.6107-1-michal_atlas@posteo.net> References: <20220612004520.6107-1-michal_atlas@posteo.net> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: waObeELIUl4ypBWmcn/8wQ X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 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=1655292442; 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: 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=a8rOx7Vadg/SFJi9pnBV4W0hK780NjNNRTetSkBQ0q8=; b=RbkmF+Y+vHFBZxlAIyDrHF55wSpXOH7lPA7wKxRkuHXsXfk5AcCn4Z9Og1+Ok1o4XjIhOs eTWi3NYjnm1O1lkdOguN7JiMgoXh+tZt7Kqp/TnSle2mK62WeeJcBkA44+Km2d4EmfjvDL yum3WLy6y8m8YzpZ6xsZgVSG52WyCZx5zmOQXDgJBu15s4jZ89ke3tYMppYs9oGRliRjfZ IBY9OGT8L4iAJEWUwAAJAvItUS1GFXJmPyhnyKhus9iPwaMOHEph3D3VD/bHF7bJF9oMiK 4lpy9mRMKbgo/2c1GvVT4k1V4i8eBVzD8NsSHm8/6xw5iz5sBuMTe4YXs+vJaw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655292442; a=rsa-sha256; cv=none; b=EIoabtZqYJDBRs9w3JizS3jAiIOL+wlABzGw340ELdVBkrEtnp/8LqDACds2CAyzCCM0Sf 3f70oEaeQo/sVT1xiKop+yil754/vu6+kcH6xfWucF8oJiMWko0+guvO4Z1FwFhDof8Vx4 MgWOm3cJx7RZ473VEet/f/YL5395+kjZorOBNTXJ65nZGvmFcbGUg8aSRMpSeISiAduAIF hDKf4c1PMmTAgaxZEZw81YMPE176i+PjcoWJRdizeEb+9q2P/8rUH81ZG/UuF6Nmy65OEm jBScgbDvum5RssjZkwtnrm9BNIMbNGizmmC4aF748pbwUPq4bGDzQ2xqePx/gA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=oQ6U18sH; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tugraz.at (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: 5.01 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=oQ6U18sH; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tugraz.at (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: E8B3C1A331 X-Spam-Score: 5.01 X-Migadu-Scanner: scn0.migadu.com X-TUID: /F3ctSQ/pZq4 Am Sonntag, dem 12.06.2022 um 00:45 +0000 schrieb Michal Atlas: > 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. > --- Put the blurb below this line, add a ChangeLog above. >  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) I find "stamp-egg-version" funnier. > +  "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 #\-)))]) We don't do square brackets in Guile. Also, using λ rather than spelling out "lambda" results in a syntax error. > +    (when (not ver?) > +      (make-file-writable filename) > +      (call-with-output-file filename > +       (λ (f) (write (cons `(version ,ver) egg-info) f)))))) "lambda". >  ;; 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) Note that 'insert-missing-version will always be logged even if the version is not actually missing. >      (replace 'build build) >      (delete 'check) >      (replace 'install install) Cheers