gexp: 'local-file' warns when passed a non-literal relative file name.
authorLudovic Courtès <ludo@gnu.org>
Thu, 1 Oct 2020 20:09:58 +0000 (22:09 +0200)
committerLudovic Courtès <ludo@gnu.org>
Fri, 2 Oct 2020 06:11:38 +0000 (08:11 +0200)
commitf43ffee90882c2d61b46d69728daa7432be297e4
tree78616df51a7950f27f4918b8395b2d1019228aad
parent23dc21f05b54ef63daaea9eb301cfddbc4c82ddb
gexp: 'local-file' warns when passed a non-literal relative file name.

Fixes <https://bugs.gnu.org/43736>.
Reported by Vitaliy Shatrov <guix.vits@disroot.org>.

* guix/gexp.scm (%local-file): Add #:literal? and #:location.
Emit a warning when LITERAL? is false and FILE is not absolute.
(local-file): In the non-literal case, pass #:location and #:literal?.
* po/guix/POTFILES.in: Add guix/gexp.scm.
* tests/guix-system.sh: Add test for the warning.
guix/gexp.scm
po/guix/POTFILES.in
tests/guix-system.sh