mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-07-06 19:48:43 +08:00
Allow excluding dev inside binary packages
This commit is contained in:
parent
805cf349cc
commit
45b72dbbb4
@ -576,6 +576,26 @@ fn parse_args(args: Vec<String>) -> anyhow::Result<(CliConfig, CliCommand, Vec<C
|
|||||||
if command.is_building() || (command.is_pushing() && config.with_package_deps) {
|
if command.is_building() || (command.is_pushing() && config.with_package_deps) {
|
||||||
// Pushing do not need dev deps, so does binary recipes at building
|
// Pushing do not need dev deps, so does binary recipes at building
|
||||||
let include_dev = command.is_building();
|
let include_dev = command.is_building();
|
||||||
|
if include_dev && default_rule == "source" {
|
||||||
|
// let's cover a very specific case, binary -> 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)?
|
CookRecipe::get_build_deps_recursive(&source_recipe_names, include_dev)?
|
||||||
} else {
|
} else {
|
||||||
CookRecipe::from_list(source_recipe_names.clone())?
|
CookRecipe::from_list(source_recipe_names.clone())?
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user