GNU bug report logs - #44525
Derivation of computed-file has no outputs

Previous Next

Package: guix;

Reported by: Stefan <stefan-guix <at> vodafonemail.de>

Date: Sun, 8 Nov 2020 20:20:02 UTC

Severity: normal

Done: Stefan <stefan-guix <at> vodafonemail.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 44525 in the body.
You can then email your comments to 44525 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#44525; Package guix. (Sun, 08 Nov 2020 20:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan <stefan-guix <at> vodafonemail.de>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sun, 08 Nov 2020 20:20:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan <stefan-guix <at> vodafonemail.de>
To: bug-guix <at> gnu.org
Subject: Derivation of computed-file has no outputs
Date: Sun, 8 Nov 2020 21:19:36 +0100
Hi!

I try to use a computed-file as an input to a bootloader profile hook function. Using guix system I get this error message:

guix system: error: reference to invalid output 'out' of derivation '/gnu/store/946szbrwn3ja74yjnibbhjisjflvsk73-test.txt.drv'

This is the simple definition of the computed-file:

(computed-file "test.txt" (with-imported-modules '((guix utils)) #~(%current-system)))

And this is the content of the generated derivation of it:

Derive([],[("/gnu/store/0hcx4wgpgf1nn4gl3lhnd055vj2y28cj-guile-3.0.2.drv",["out"]),("/gnu/store/2ss1lzy0x0wwayy5n5mvzmsv77dnni39-module-import-compiled.drv",["out"])],["/gnu/store/9lw2pp0hjcjgmq5hx7w6aq92699r6pim-module-import","/gnu/store/plgbvrkkq1ghvph24kf0bdgb4w8glgqb-test.txt-builder"],"aarch64-linux","/gnu/store/x3gq648qnfnla7nppyfjvj62s2i8y7rl-guile-3.0.2/bin/guile",["--no-auto-compile","-L","/gnu/store/9lw2pp0hjcjgmq5hx7w6aq92699r6pim-module-import","-C","/gnu/store/3v6bh2hn62i4qp674d1hqg4ca7hpys3a-module-import-compiled","/gnu/store/plgbvrkkq1ghvph24kf0bdgb4w8glgqb-test.txt-builder"],[("preferLocalBuild","1")])

I think the problem is visible already with this call:

scheme@(guile-user)> (derivation-path->output-paths "/gnu/store/946szbrwn3ja74yjnibbhjisjflvsk73-test.txt.drv")
$5 = ()


Bye

Stefan





Information forwarded to bug-guix <at> gnu.org:
bug#44525; Package guix. (Sun, 08 Nov 2020 20:46:01 GMT) Full text and rfc822 format available.

Message #8 received at 44525 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <marius <at> gnu.org>
To: Stefan <stefan-guix <at> vodafonemail.de>, 44525 <at> debbugs.gnu.org
Subject: Re: bug#44525: Derivation of computed-file has no outputs
Date: Sun, 08 Nov 2020 21:44:51 +0100
[Message part 1 (text/plain, inline)]
Stefan <stefan-guix <at> vodafonemail.de> writes:

> Hi!
>
> I try to use a computed-file as an input to a bootloader profile hook function. Using guix system I get this error message:
>
> guix system: error: reference to invalid output 'out' of derivation '/gnu/store/946szbrwn3ja74yjnibbhjisjflvsk73-test.txt.drv'

>
> This is the simple definition of the computed-file:
>
> (computed-file "test.txt" (with-imported-modules '((guix utils)) #~(%current-system)))

That's expected: this derivation does not produce any outputs.

Assuming you intended to write (%current-system) to test.txt, you can do
something along these lines:

  (computed-file "test.txt"
                 #~(call-with-output-file #$output
                     (lambda (port)
                       (format port #$(%current-system)))))

So I think this is not-a-bug.  WDYT?
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#44525; Package guix. (Sun, 08 Nov 2020 23:39:01 GMT) Full text and rfc822 format available.

Message #11 received at 44525 <at> debbugs.gnu.org (full text, mbox):

From: Stefan <stefan-guix <at> vodafonemail.de>
To: Marius Bakke <marius <at> gnu.org>
Cc: 44525 <at> debbugs.gnu.org
Subject: Re: bug#44525: Derivation of computed-file has no outputs
Date: Mon, 9 Nov 2020 00:38:40 +0100
Hi Marius!

> Assuming you intended to write (%current-system) to test.txt, you can do
> something along these lines:
> 
>  (computed-file "test.txt"
>                 #~(call-with-output-file #$output
>                     (lambda (port)
>                       (format port #$(%current-system)))))

Thanks for this solution.

> That's expected: this derivation does not produce any outputs.
> So I think this is not-a-bug.  WDYT?


I think I got a bit distracted by the functionality of plain-file and the similar wording of the documentation of computed-file.

Thanks, I’ll close this issue.


Bye

Stefan



Reply sent to Stefan <stefan-guix <at> vodafonemail.de>:
You have taken responsibility. (Sun, 08 Nov 2020 23:47:02 GMT) Full text and rfc822 format available.

Notification sent to Stefan <stefan-guix <at> vodafonemail.de>:
bug acknowledged by developer. (Sun, 08 Nov 2020 23:47:02 GMT) Full text and rfc822 format available.

Message #16 received at 44525-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan <stefan-guix <at> vodafonemail.de>
To: 44525-done <at> debbugs.gnu.org
Date: Mon, 9 Nov 2020 00:45:50 +0100



bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 07 Dec 2020 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 254 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.