From 830270840bc66b4c00e158f4c77fff8e60b0c77b Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Wed, 21 Dec 2022 20:02:56 +0100 Subject: [PATCH] make sure genext2fs and genext2fs exist for the respective formats --- mmdebstrap | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mmdebstrap b/mmdebstrap index d1f56e8..371ce33 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -5426,6 +5426,16 @@ sub main() { info "ignoring target $options->{target} with null format"; } + if ($format eq 'ext2') { + if (!can_execute 'genext2fs') { + error "need genext2fs for ext2 format"; + } + } elsif ($format eq 'squashfs') { + if (!can_execute 'tar2sqfs') { + error "need tar2sqfs binary from the squashfs-tools-ng package"; + } + } + if (any { $_ eq $format } ('tar', 'squashfs', 'ext2', 'null')) { if ($format ne 'null') { if (any { $_ eq $options->{variant} } ('extract', 'custom')