From 8767afa0638edc4d3a8995dc96ebfeb6703fc6a5 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 7 Dec 2020 16:32:48 +0100 Subject: Make sources named This patch changes the sources to be named. This is required for nice interpolation when layering pkg.toml files. Before this, we had to make sure that the `[[sources]]` array element was on the right position. For example, consider two files: /pkg.toml /package/pkg.toml in the first: [[sources]] url = "some/thing" in the second: [[sources] hash.type = "sha1" hash.value = "asdf..." When merged: [[sources] url = "some/thing" hash.type = "sha1" hash.value = "asdf..." but because the _position_ was responsible for merging these elements, adding a new source file _before_ the existing on in /pkg.toml would yield the /package/pkg.toml incomplete when merged onto /pkg.toml, thus resulting in an error. With named source entries, this is less likely. The source file name includes the source name as well, of course. Signed-off-by: Matthias Beyer --- examples/packages/example_3/pkg.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/packages/example_3/pkg.toml b/examples/packages/example_3/pkg.toml index 1e3cda8..42ad00c 100644 --- a/examples/packages/example_3/pkg.toml +++ b/examples/packages/example_3/pkg.toml @@ -4,7 +4,7 @@ version_is_semver = false # no patches by default patches = [] -[[sources]] +[sources.src] url = "https://github.com/user/repo/archive/sources.tar.gz" hash.type = "sha1" hash.hash = "5e8bcaa3c758f84f01935a914e2bbf01309462ae" -- cgit v1.2.3