From 32db7e255f18d8f9514de423bd65264d2090949e Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 3 Dec 2020 08:29:37 +0100 Subject: 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 /-/.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 --- src/config/util.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/config') 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}} "#)) } -- cgit v1.2.3