Skip to content

Commit

Permalink
idk???
Browse files Browse the repository at this point in the history
  • Loading branch information
madonuko committed Oct 10, 2023
1 parent 69d71c3 commit 392779e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ impl RootBuilder for DnfRootBuilder {
}
options.append(&mut exclude.iter().map(|p| format!("--exclude={p}")).collect());

tracing::info!("Initializing system with dnf");
crate::chroot_run_cmd!(chroot,
dnf install -y --releasever=$releasever --installroot=$chroot $[packages] $[options] 2>&1;
dnf clean all --installroot=$chroot;
Expand Down Expand Up @@ -505,7 +506,7 @@ impl IsoBuilder {
const ISO_TREE: &str = "iso-tree";

impl ImageBuilder for IsoBuilder {
fn build(&self, chroot: &Path, image: &Path, manifest: &Manifest) -> Result<()> {
fn build(&self, chroot: &Path, _: &Path, manifest: &Manifest) -> Result<()> {
// let iso_config = manifest.iso.as_ref().expect("A valid ISO configuration");
let image = PathBuf::from(manifest.out_file.as_ref().map_or("out.iso", |s| s));
// Create workspace directory
Expand All @@ -528,11 +529,9 @@ impl ImageBuilder for IsoBuilder {
self.squashfs(chroot, &image_dir.join("squashfs.img"))?;

self.bootloader.copy_liveos(manifest, chroot)?;
let image = format!("{}/katsu.iso", image.display());
let path = PathBuf::from(image);

self.xorriso(chroot, path.as_path(), manifest)?;
self.bootloader.install(path.as_path())?;
self.xorriso(chroot, &image, manifest)?;
self.bootloader.install(&image)?;

Ok(())
}
Expand Down
4 changes: 2 additions & 2 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ impl std::str::FromStr for OutputFormat {
}
}

#[tracing::instrument]
pub fn parse(cli: KatsuCli) -> Result<()> {
println!("{cli:?}");

// load manifest from config file

sudo::escalate_if_needed().unwrap();
Expand All @@ -56,6 +55,7 @@ pub fn parse(cli: KatsuCli) -> Result<()> {

let builder = KatsuBuilder::new(manifest, cli.output)?;

tracing::info!("Building image");
builder.build()?;

Ok(())
Expand Down

0 comments on commit 392779e

Please sign in to comment.