distro_info: add UNRELEASED series handling, use it in deb and chlog
This commit is contained in:
@@ -83,8 +83,20 @@ async fn build_binary_package_impl(
|
||||
let changelog_path = cwd.join("debian/changelog");
|
||||
let (package, version, package_series) =
|
||||
crate::changelog::parse_changelog_header(&changelog_path)?;
|
||||
// UNRELEASED is not a real archive series: without an explicit --series,
|
||||
// build against the development series of the host vendor's distribution
|
||||
// instead. An explicit --series always wins.
|
||||
let resolved_series;
|
||||
let series = if let Some(s) = series {
|
||||
s
|
||||
} else if crate::distro_info::is_unreleased(&package_series) {
|
||||
let dist = crate::build::env::current_vendor();
|
||||
resolved_series = crate::distro_info::effective_series(&package_series, &dist).await?;
|
||||
log::info!(
|
||||
"Changelog is UNRELEASED, building against series {}",
|
||||
resolved_series
|
||||
);
|
||||
resolved_series.as_str()
|
||||
} else {
|
||||
&package_series
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user