GNU bug report logs - #42164
Combining file-append with gexps results in incomprehensible errors

Previous Next

Package: guix;

Reported by: Jakub Kądziołka <kuba <at> kadziolka.net>

Date: Thu, 2 Jul 2020 12:01:02 UTC

Severity: normal

Done: Maxime Devos <maximedevos <at> telenet.be>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Jakub Kądziołka <kuba <at> kadziolka.net>
Subject: bug#42164: closed (Re: bug#42164: Combining file-append with
 gexps results in incomprehensible errors)
Date: Mon, 25 Apr 2022 06:22:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#42164: Combining file-append with gexps results in incomprehensible errors

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 42164 <at> debbugs.gnu.org.

-- 
42164: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42164
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Maxime Devos <maximedevos <at> telenet.be>
To: Brian Cully <bjc <at> spork.org>
Cc: 42164-done <at> debbugs.gnu.org
Subject: Re: bug#42164: Combining file-append with gexps results in
 incomprehensible errors
Date: Mon, 25 Apr 2022 08:20:57 +0200
[Message part 3 (text/plain, inline)]
Brian Cully schreef op zo 24-04-2022 om 19:27 [-0400]:
> --8<---------------cut here---------------start------------->8---
> (file-append #~#$gcc:lib “/lib”)
> --8<---------------cut here---------------end--------------->8---
> 
> 	The “correct” way is this:
> --8<---------------cut here---------------start------------->8---
> (gexp-input (file-append gcc "/lib") "lib")
> --8<---------------cut here---------------end--------------->8---

FWIW, I was actually thinking of

  (file-append (gexp-input gcc "lib") "/lib")

(First select the output with 'gexp-input', then append a suffix.)

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]
[Message part 5 (message/rfc822, inline)]
From: Jakub Kądziołka <kuba <at> kadziolka.net>
To: bug-guix <at> gnu.org
Subject: Combining file-append with gexps results in incomprehensible errors
Date: Thu, 2 Jul 2020 14:00:29 +0200
[Message part 6 (text/plain, inline)]
Consider this minimal operating-system definition:

(use-modules (gnu))
(use-package-modules gcc)

(operating-system
  (host-name "test")
  (timezone "UTC")
  (bootloader (bootloader-configuration
                (bootloader grub-efi-bootloader)
                (target "/boot/efi")))
  (file-systems (cons*
                  (file-system
                    (device (file-system-label "root"))
                    (mount-point "/")
                    (type "ext4"))
                  %base-file-systems))
  (packages '())
  (services (cons*
              (service special-files-service-type
                       `(("/lib64" ,(directory-union "rustup-libs"
                                      (list
                                        (file-append glibc "/lib")
                                        (file-append #~#$gcc:lib "/lib"))))))
              %base-services)))

I would expect this way of specifying a specific output of a package to
work, but it results in the following error:

ice-9/boot-9.scm:1515:18: object is not an exception of the right type #<&gexp-input-error input: #<gexp #<gexp-input #<package gcc <at> 7.5.0 gnu/packages/gcc.scm:520 7f06c996c960>:lib> 7f06c6b06990>> #<record-type &package-input-error>

This also happens when I omit the directory-union:

              (service special-files-service-type
                       `(("/lib64" ,(file-append #~#$gcc:lib "/lib"))))

What *does* work, is this variant with string-append:

              (service special-files-service-type
                       `(("/lib64" ,#~(string-append #$gcc:lib "/lib"))))

However, using it in the directory-union breaks again:

              (service special-files-service-type
                       `(("/lib64" ,(directory-union "rustup-libs"
                                      (list
                                        (file-append glibc "/lib")
                                        #~(string-append #$gcc:lib "/lib"))))))

ERROR: In procedure opendir:
Wrong type (expecting string): (string-append "/gnu/store/mdxmdhrlkgdik6ay9pzmmy8mjcbibpwb-gcc-7.5.0-lib" "/lib")
builder for `/gnu/store/p5hf7hqxn35fgsb75s5i7326vyzb8jkr-rustup-libs.drv' failed with exit code 1

I have figured out that the following does work:

              (service special-files-service-type
                       `(("/lib64" ,#~(directory-union "rustup-libs"
                                        (list
                                          (string-append #$glibc "/lib")
                                          (string-append #$gcc:lib "/lib"))))))

However, I would expect the other variants to work as well. The
documentation and error messages are lacking in this regard.

Regards,
Jakub Kądziołka
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 30 days ago.

Previous Next


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