diff --git a/src/bin/repo.rs b/src/bin/repo.rs index 0dfc1ff3..ec6ccd3c 100644 --- a/src/bin/repo.rs +++ b/src/bin/repo.rs @@ -576,6 +576,26 @@ fn parse_args(args: Vec) -> anyhow::Result<(CliConfig, CliCommand, Vec source -> binary -> dev + // in this case, we need to move that "source" to "binary", because + // that would include dev from its binary child, which is unnecessary + let mut i = 0; + while i < source_recipe_names.len() { + let name = &source_recipe_names[i]; + match special_rules.get(name) { + Some(s) if s.as_str() == "source" => { + if binary_names.contains(name) { + let bin = source_recipe_names.remove(i); + binary_recipe_names.push(bin); + continue; + } + } + _ => {} + } + i += 1; + } + } CookRecipe::get_build_deps_recursive(&source_recipe_names, include_dev)? } else { CookRecipe::from_list(source_recipe_names.clone())?