From b60893aa83647940377a904cc27fd15c6b2ec601 Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Sun, 3 May 2020 15:06:41 +0200 Subject: [PATCH] add --skip=output/dev --- mmdebstrap | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mmdebstrap b/mmdebstrap index 6d8aeab..b7dfbd3 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -4150,7 +4150,11 @@ sub main() { # Add ./dev as the first entries of the tar file. # We cannot add them after calling tar, because there is no # way to prevent tar from writing NULL entries at the end. - print $devtar; + if (any { $_ eq 'output/dev' } @{ $options->{skip} }) { + info "skipping output/dev as requested"; + } else { + print $devtar; + } # pack everything except ./dev 0 == system('tar', @taropts, '-C', $options->{root}, '.') @@ -4214,7 +4218,11 @@ sub main() { # Add ./dev as the first entries of the tar file. # We cannot add them after calling tar, because there is no way # to prevent tar from writing NULL entries at the end. - print $devtar; + if (any { $_ eq 'output/dev' } @{ $options->{skip} }) { + info "skipping output/dev as requested"; + } else { + print $devtar; + } if ($options->{mode} eq 'fakechroot') { # Fakechroot requires tar to run inside the chroot or