diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-07-17 00:04:41 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-07-19 11:53:47 +0200 |
commit | 45b903323e0fecb7947926d2c14103d47fea624a (patch) | |
tree | b53dd88f3584004144ecd247b32eed0242509830 /tests/utils.scm | |
parent | bacfec8611530dc3e849fb804b51f50b299796f0 (diff) |
channels: Strictly check the version of '.guix-channel'.
Until now the 'version' field in '.guix-channel' could be omitted, or it
could be any value.
* guix/channels.scm (read-channel-metadata): Rename to...
(channel-instance-metadata): ... this.
(channel-instance-dependencies): Adjust accordingly.
(read-channel-metadata): New procedure. Use 'match'
to require a 'version' field. Provide proper error handling when the
channel sexp is malformed or when given an unsupported version number.
(read-channel-metadata-from-source): Use 'catch' and
'system-error-errno' instead of 'file-exists?'.
* tests/channels.scm (instance--unsupported-version): New variable.
(read-channel-metadata): Rename to...
(channel-instance-metadata): ... this. Rename tests accordingly.
("channel-instance-metadata rejects unsupported version"): New test.
Diffstat (limited to 'tests/utils.scm')
0 files changed, 0 insertions, 0 deletions