| 871 | |
| 872 | #[context("Exporting tar")] |
| 873 | pub fn export_tar(&self) -> Result<&'static Utf8Path> { |
| 874 | let cancellable = gio::Cancellable::NONE; |
| 875 | let (_, rev) = self.srcrepo.read_commit(self.testref(), cancellable)?; |
| 876 | let path = "exampleos-export.tar"; |
| 877 | let mut outf = std::io::BufWriter::new(self.dir.create(path)?); |
| 878 | #[allow(clippy::needless_update)] |
| 879 | let options = crate::tar::ExportOptions { |
| 880 | ..Default::default() |
| 881 | }; |
| 882 | crate::tar::export_commit(&self.srcrepo, rev.as_str(), &mut outf, Some(options))?; |
| 883 | outf.flush()?; |
| 884 | Ok(path.into()) |
| 885 | } |
| 886 | |
| 887 | /// Export the current ref as a container image. |
| 888 | /// This defaults to using chunking. |