diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-12-03 08:29:37 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-12-03 08:29:37 +0100 |
commit | 32db7e255f18d8f9514de423bd65264d2090949e (patch) | |
tree | 8a1636aabd91a8cc8391f156b2018216e90a4697 /src/config | |
parent | 6d1abb2d5c05869d3b2e966efad0ba34aafe578b (diff) |
Allow multiple sources per package
This patch implements multiple (unnamed) sources per package.
This means that a package can have an array of sources.
What was adapted to allow multiple sources per package:
* Downloads are made in parallel now
* The cache structure was changed to /<package>-<version>/<hash>.source
* The UI was changed to contain the full `Package` struct (as JSON
object) in a UI format string
Tests were adapted.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/util.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/config/util.rs b/src/config/util.rs index 17aeadf..ecd94c8 100644 --- a/src/config/util.rs +++ b/src/config/util.rs @@ -4,13 +4,12 @@ pub fn default_progress_format() -> String { pub fn default_package_print_format() -> String { String::from(indoc::indoc!(r#" - {{i}} - {{name}} : {{version}} - Source: {{source_url}} - Hash ({{source_hash_type}}): {{source_hash}} - {{#if print_system_deps}}System Deps: {{ system_deps }} {{/if}} - {{#if print_system_runtime_deps}}System runtime Deps: {{ system_runtime_deps }} {{/if}} - {{#if print_build_deps}}Build Deps: {{ build_deps }} {{/if}} - {{#if print_runtime_deps}}Runtime Deps: {{ runtime_deps }} {{/if}} + {{i}} - {{p.name}} : {{p.version}} + {{#each p.sources}}Source: {{this.url}} - {{this.hash.hash}} ({{this.hash.type}}){{/each}} + {{#if print_system_deps}}System Deps: {{ p.dependencies.system }} {{/if}} + {{#if print_system_runtime_deps}}System runtime Deps: {{ p.dependencies.system_runtime }} {{/if}} + {{#if print_build_deps}}Build Deps: {{ p.dependencies.build }} {{/if}} + {{#if print_runtime_deps}}Runtime Deps: {{ p.dependencies.runtime }} {{/if}} "#)) } |