deb,quirks: generic dependency rules for build-dep workarounds
The resolute linux and linux-riscv controls declare llvm-21-dev unqualified while their other llvm pieces are :native, so the dpkg cross rules resolve it against the host architecture — whose dependency closure needs python3:riscv64, conflicting with the python3 the control itself declares :native. No resolver can install that set; sbuild fails on it identically. Give the deb quirks a dependencies rule set rather than a one-off native-qualification knob: replace rewrites a declared dependency by name with a full dependency string (qualifier, version and restrictions included), inject adds dependencies resolved as if declared, drop ignores declared ones. Entries are scoped by series so they can be dropped when the upstream packaging catches up, and rule names that match nothing are warned about so stale quirks surface. Ship the llvm-21-dev entry for the resolute kernels: resolve it as llvm-21-dev:native, keeping the declared <!stage1> restriction.
This commit is contained in:
+6
-1
@@ -265,6 +265,7 @@ pub async fn build(
|
||||
package,
|
||||
version,
|
||||
arch,
|
||||
series,
|
||||
package_dir_str,
|
||||
build_root,
|
||||
cross,
|
||||
@@ -564,6 +565,7 @@ fn install_build_dependencies(
|
||||
package: &str,
|
||||
version: &str,
|
||||
arch: &str,
|
||||
series: &str,
|
||||
package_dir: &str,
|
||||
build_root: &str,
|
||||
cross: bool,
|
||||
@@ -610,10 +612,13 @@ fn install_build_dependencies(
|
||||
union: false,
|
||||
build_dep: true,
|
||||
};
|
||||
let clauses: Vec<Vec<PkgRelation>> = Deps::parse(&deps_value, &parse_opts)?
|
||||
let mut clauses: Vec<Vec<PkgRelation>> = Deps::parse(&deps_value, &parse_opts)?
|
||||
.clauses()
|
||||
.map(<[PkgRelation]>::to_vec)
|
||||
.collect();
|
||||
// Package-specific workarounds (see data/quirks.yml), before anything
|
||||
// derives candidate queries or install specs from the clauses.
|
||||
crate::quirks::apply_dependency_quirks(package, series, &mut clauses, &parse_opts)?;
|
||||
let conflict_clauses: Vec<Vec<PkgRelation>> = if conflicts_value.trim().is_empty() {
|
||||
Vec::new()
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user