deps: resolve :native against DEB_BUILD_ARCH in cross builds
CheckOpts had no build-arch concept: the build-side facts and :native qualifiers resolved against the host arch, so in a cross build (-a armhf on amd64) 'Build-Depends: foo:native' looked for an armhf package where dpkg-checkbuilddeps looks for an amd64 one. CheckOpts gains build_arch (DEB_BUILD_ARCH), used for :native and the dpkg status attribution; bracketed arch restrictions keep evaluating against the host arch.
This commit is contained in:
+7
-1
@@ -354,6 +354,10 @@ pub fn run_source_build(
|
||||
.get("DEB_HOST_ARCH")
|
||||
.cloned()
|
||||
.unwrap_or_else(|| crate::debian::arch::native().unwrap_or_default()),
|
||||
build_arch: arch_vars
|
||||
.get("DEB_BUILD_ARCH")
|
||||
.cloned()
|
||||
.unwrap_or_else(|| crate::debian::arch::native().unwrap_or_default()),
|
||||
build_profiles: profiles.clone(),
|
||||
..Default::default()
|
||||
};
|
||||
@@ -1599,8 +1603,10 @@ mod differential_tests {
|
||||
}
|
||||
i += 1;
|
||||
}
|
||||
let host_arch = crate::debian::arch::native().unwrap_or_else(|_| "amd64".into());
|
||||
let opts = crate::debian::deps::CheckOpts {
|
||||
host_arch: crate::debian::arch::native().unwrap_or_else(|_| "amd64".into()),
|
||||
host_arch: host_arch.clone(),
|
||||
build_arch: host_arch,
|
||||
build_profiles: profiles,
|
||||
ignore_arch,
|
||||
ignore_indep,
|
||||
|
||||
Reference in New Issue
Block a user