hurd-boot: Explain why 'getxattr' cannot be used on GNU/Hurd.

This is a followup to f25e8f76fe.

* gnu/build/hurd-boot.scm (translated?): Clarify why 'getxattr' cannot
be used on GNU/Hurd.
This commit is contained in:
Ludovic Courtès 2022-11-27 23:41:16 +01:00
parent 450f774028
commit b5e334aeb8
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -127,6 +127,9 @@ (define (passive-translator-installed? file-name)
(define (translated? file-name) (define (translated? file-name)
"Return true if a translator is installed on FILE-NAME." "Return true if a translator is installed on FILE-NAME."
;; On GNU/Hurd, 'getxattr' in glibc opens the file without O_NOTRANS, and
;; then, for "gnu.translator", it calls 'file_get_translator', resulting in
;; EOPNOTSUPP (conversely, 'showtrans' opens the file with O_NOTRANS).
(if (string-contains %host-type "linux-gnu") (if (string-contains %host-type "linux-gnu")
(passive-translator-xattr? file-name) (passive-translator-xattr? file-name)
(passive-translator-installed? file-name))) (passive-translator-installed? file-name)))