Skip to content

Commit

Permalink
boulder/draft: Default to autotools on unhandled build system
Browse files Browse the repository at this point in the history
This will most likely be the closest match, plus we write out the recipe
file unconditionally then much to deangst to our packagers.
  • Loading branch information
joebonrichie committed Jan 7, 2025
1 parent 556a8f6 commit 36d095f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions boulder/src/draft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use fs_err as fs;
use itertools::Itertools;
use moss::Dependency;
use thiserror::Error;
use tui::Styled;
use url::Url;

use crate::util;
Expand Down Expand Up @@ -54,9 +55,13 @@ impl Drafter {
// Remove temp extract dir
fs::remove_dir_all(extract_root)?;

let Some(build_system) = build.detected_system else {
return Err(Error::UnhandledBuildSystem);
};
let build_system = build.detected_system.unwrap_or_else(|| {
println!(
"{} | Unhandled build system! - Defaulting to autotools",
"Warning".yellow()
);
build::System::Autotools
});

let builddeps = builddeps(build.dependencies);
let environment = build_system
Expand Down Expand Up @@ -125,8 +130,6 @@ impl File<'_> {

#[derive(Debug, Error)]
pub enum Error {
#[error("Unhandled build system")]
UnhandledBuildSystem,
#[error("analyzing build system")]
AnalyzeBuildSystem(#[source] build::Error),
#[error("upstream")]
Expand Down

0 comments on commit 36d095f

Please sign in to comment.