From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uNfFGAv9b2FEYwEAgWs5BA (envelope-from ) for ; Wed, 20 Oct 2021 13:27:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 6DtPFAv9b2EgZQAAbx9fmQ (envelope-from ) for ; Wed, 20 Oct 2021 11:27:07 +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 DB9773D08 for ; Wed, 20 Oct 2021 13:27:06 +0200 (CEST) Received: from localhost ([::1]:55988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1md9kO-00016k-Vp for larch@yhetil.org; Wed, 20 Oct 2021 07:27:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57274) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1md9TE-0006o8-29 for guix-devel@gnu.org; Wed, 20 Oct 2021 07:09:20 -0400 Received: from lepiller.eu ([2a00:5884:8208::1]:53578) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1md9TB-0007vL-4D for guix-devel@gnu.org; Wed, 20 Oct 2021 07:09:19 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 6e09ac6e; Wed, 20 Oct 2021 11:09:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:in-reply-to:references:message-id:mime-version :content-type:content-transfer-encoding; s=dkim; bh=23ti8HKJHCY2 DDsPvym9LipLO/yxyHBOWjeKHddbVqs=; b=cxIPahQusy+DNZVCnD9CGJix7KIj udM71+oacGTqkcOZYC5Uh1GcXFOPNbaSXTbdwRok6GEU7Ou9TIA/bjoLn+1pBHzB K+yFju+qQ4nCGNU7jJzgd3UXvAbWAQch0gXTI3A7rxfonAD8gRr9Czs32E93Hag3 B3v+2F9UwCuc0xo0lG3G4hLmRs9xyOC72041dawMUjg6O33Zn29t/7vkZnlTeVZF aqA4dmFpk9/A4BRmOEWDy7EgXGc59HR0qXLhmRgVzWd1xU6Y2B429C3qzv8IC4E9 2IXW/UlDYNbwXlHcbq9unyDA73/bbOKCjk0MzkDe/nG7KAPtqzJLZF4PwA== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 98828e37 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Wed, 20 Oct 2021 11:09:10 +0000 (UTC) Date: Wed, 20 Oct 2021 07:08:58 -0400 From: Julien Lepiller To: guix-devel@gnu.org, Phil Beadling Subject: Re: --with-source version not honored? User-Agent: K-9 Mail for Android In-Reply-To: References: Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=----R4ZF2512D0E022GF60AOF38D4CH9X0 Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, HTML_MESSAGE=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.23 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1634729227; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=eqblHWM0OFZsKArnXvWQUbzT13nDUfRzLXr92NIifgA=; b=j9LohnwyBPhDPrd9XoiOMwzYMLyY4gJhYsWlXaWGEiNx7sxgA2qqC8TpmhHx/rhWwHSx6E C7l6rRwbpl+KssRklF73fwADfwc9KVJnt+A4Rrx+XGj8BcWTaznikDIfSP7DankM1kXlGd mxbcHIUj+JIc48rr8qBNi4ojnsaG1TJcRyTR1PWi3hskXNVWryWxwimG6x3VhMUmpwr0Xe 9tg6KzEskyEFI0+8UPaKs56/HngM/1KSanCOzGZiKaAbhZCIox7YuONdTf3bWfGCcO7nxL vm71wcLVIooXqDd4KSoGWBzpgU1kNvq57eD7kx5m/bvh0X6YnWOJNq5YvgQMig== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1634729227; a=rsa-sha256; cv=none; b=RFexfhNSymco8pVwXNu91tx764914SBMqSnE4s0phEvl12NR86Vq4HRlIDj64A+/J0OvYg 8wBDjFXxc6obnLbDMvlvWvNdCnIonj7MuNqzf+jdcznDRp8Qw0hG09hwgYiIo3MG8abgPg viNmU3ZE/XRSxC7Jvmj0NLWUPV/b3o5h/d7fGM2aWMz4rTsbFnQKUO5FVUP5/ILNfZGLN2 fdVUcA3YqyJWpSM1MLRp2hUZ97775NNZjvSvvythkJyuy72ArKXb3UYU1uNZc8sIC8VCY8 8iR4xQwzZ43vpisVbQyPAXtFAcwclfKhgPbYaX5hzfDzF4JJojxyQnjsqN3OVA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=lepiller.eu header.s=dkim header.b=cxIPahQu; dmarc=pass (policy=none) header.from=lepiller.eu; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -2.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lepiller.eu header.s=dkim header.b=cxIPahQu; dmarc=pass (policy=none) header.from=lepiller.eu; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: DB9773D08 X-Spam-Score: -2.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: tvjD2stB8Jo4 ------R4ZF2512D0E022GF60AOF38D4CH9X0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I think your incantation is incorrect: you build foobar@9=2E0=2E1, and you = replace the source of foobar@9=2E5=2E0 only=2E For the rest of your question, I think there is actually no way to fix tha= t: when you use ",version", it gets evaluated before you can import the pac= kage=2E Maybe (package-version this-package) would work? Le 20 octobre 2021 05:18:02 GMT-04:00, Phil Beadling a =C3=A9crit=C2=A0: >Hi all, > >I'm using the following incantation: > >guix build >--with-source=3Dfoobar@9=2E5=2E0=3D/opt/thirdparty/foobar/foobar950_beta/= linux64 ><--with-source=3Dgurobipy@9=2E5=2E0=3D/opt/thirdparty/gurobi/gurobi950_be= ta/linux64> >foobar > > >However the package build is failing with: > >(copy-file "lib/libfoobar=2Eso=2E9=2E0=2E1" "/gnu/store/gkawzac=E2=80=A6"= ) > >In procedure copy-file: No such file or directory > > >That is the new version number 9=2E5=2E0 is not written to every place wh= en >transforming the original package (version 9=2E0=2E1)=2E I think only th= e >package-version is updated, but the other package components are not then >regenerated, meaning that if they use the package-version as an input we >get a disjoint package=2E > >In the example above I use version like so: > > > > > > >*(add-after 'install 'install-foobar-library > (lambda* (#:key outputs #:allow-other-keys) > (let* ((dir (string-append (assoc-ref outputs "out") > >"/lib/python3=2E8/site-packages/foobar/")) > (lib-to-install (string-appe= nd >"libfoobar=2Eso=2E" ,version))* > >But ",version" is not updated, nor is it updated if I change this to call >(package-version foobar)=2E > > >If I drop into Guile I can see this a bit more clearly by writing a >manifest - the code below gives exactly the same error however when the >package-version is displayed it correctly responds with 9=2E5=2E0=2E > >Not sure if this should be considered a bug, or if there is a lazy way of >evaluating version so avoid the problem - I think it's unexpected from a >practicioners point of view as packages end up inconsistent=2E > >I presume I can manually replace the arguments section of the package in >the manifest to workaround this - is there a standard way of doing this? > >Any ideas or clarifications welcome! > >Cheers, >Phil=2E > > > > > > > > > > > > > > > > >*(use-modules (guix transformations) (guix packages))(define >transform ;; The package transformation procedure=2E >(options->transformation '((with-source =2E >"gurobipy@9=2E5=2E0=3D/opt/thirdparty/foobar/foobar950_beta/linux64"))))(= define >my-package (transform (specification->package "foobar")))(display >(package-version my-package)) ;; this will display version >9=2E5=2E0(newline)(packages->manifest (list my-package)) ;; building this= will >fail because copy-file still looks for 9=2E0=2E1* ------R4ZF2512D0E022GF60AOF38D4CH9X0 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable I think your incantation is incorrect: you build f= oobar@9=2E0=2E1, and you replace the source of foobar@9=2E5=2E0 only=2E
=
For the rest of your question, I think there is actually no way to fix = that: when you use ",version", it gets evaluated before you can import the = package=2E Maybe (package-version this-package) would work?

Le 20 octobre 2021 05:18:02 GMT-04:00, Phil Beadling <= ;phil@beadling=2Eco=2Euk> a =C3=A9crit=C2=A0:
Hi all,

I'm using the follo= wing incantation:

guix build --= with-source=3Dfoobar@9=2E5=2E0=3D/opt/thirdparty/foobar/foobar950_beta/linu= x64 foobar


However the package build is failing with:

(copy-file "lib/libfoobar=2Eso=2E9=2E0=2E1" "/gnu/store/gkawzac= =E2=80=A6")

In procedure copy-file: No such f= ile or directory


That is the new version number 9=2E5=2E0 is not written to every pla= ce when transforming the original package (version 9=2E0=2E1)=2E  I th= ink only the package-version is updated, but the other package components a= re not then regenerated, meaning that if they use the package-version as an= input we get a disjoint package=2E

In the ex= ample above I use version like so:


(add-after 'install 'install-foobar-library
       =                     &nbs= p;         (lambda* (#:key outputs #:allow-other-keys)<= br>                    &n= bsp;                   (let* (= (dir (string-append (assoc-ref outputs "out")
       = ;                     &nb= sp;                     &= nbsp;               "/lib/python3=2E8/si= te-packages/foobar/"))
         = ;            &n= bsp;            = ;            &n= bsp;  (lib-to-install (string-append "libfoobar=2Eso=2E" ,version))

But ",version" is not updated, nor is it = updated if I change this to call (package-version foobar)=2E

=

If I drop into Guile I can see this a bit more cl= early by writing a manifest - the code below gives exactly the same error h= owever when the package-version is displayed it correctly responds with 9= =2E5=2E0=2E

Not sure if this should be considered = a bug, or if there is a lazy way of evaluating version so avoid the problem= - I think it's unexpected from a practicioners point of view as packages e= nd up inconsistent=2E

I presume I can manually rep= lace the arguments section of the package in the manifest to workaround thi= s - is there a standard way of doing this?

Any ide= as or clarifications welcome!

Cheers,
Phil=2E

(use-modules (guix transformation= s)
             (guix packages))
<= br>
(define transform
  ;; The package transformation procedure= =2E
  (options->transformation
   '((with-source = =2E "gurobipy@9=2E5=2E0=3D/opt/thirdparty/foobar/foobar950_beta/linux64")))= )

(define my-package (transform (specification->package "foobar")= ))

(display (package-version my-package)) ;; this will display versi= on 9=2E5=2E0

(newline)
(packages->manifest
 (list my-p= ackage)) ;; building this will fail because copy-file still looks for 9=2E0= =2E1



------R4ZF2512D0E022GF60AOF38D4CH9X0--