forked from josch/mmdebstrap
return immediately if nothing to do in download, extract and essential stages
This commit is contained in:
parent
c0ee8c82db
commit
e1d0a17751
1 changed files with 15 additions and 0 deletions
15
mmdebstrap
15
mmdebstrap
|
@ -1696,6 +1696,11 @@ sub run_download() {
|
|||
# (essential variant) then we have to compute the package set ourselves.
|
||||
# Same if we want to install priority based variants.
|
||||
if (any { $_ eq $options->{variant} } ('extract', 'custom')) {
|
||||
if (scalar @pkgs_to_install == 0) {
|
||||
info "nothing to download -- skipping...";
|
||||
return ([], []);
|
||||
}
|
||||
|
||||
if ($options->{dryrun}) {
|
||||
info "simulate downloading packages with apt...";
|
||||
} else {
|
||||
|
@ -1902,6 +1907,11 @@ sub run_extract() {
|
|||
return;
|
||||
}
|
||||
|
||||
if (scalar @{$essential_pkgs} == 0) {
|
||||
info "nothing to extract -- skipping...";
|
||||
return;
|
||||
}
|
||||
|
||||
info "extracting archives...";
|
||||
print_progress 0.0;
|
||||
my $counter = 0;
|
||||
|
@ -2137,6 +2147,11 @@ sub run_essential() {
|
|||
my $essential_pkgs = shift;
|
||||
my $chrootcmd = shift;
|
||||
|
||||
if (scalar @{$essential_pkgs} == 0) {
|
||||
info "no essential packages -- skipping...";
|
||||
return;
|
||||
}
|
||||
|
||||
if ($options->{mode} eq 'chrootless') {
|
||||
if ($options->{dryrun}) {
|
||||
info "simulate installing packages...";
|
||||
|
|
Loading…
Reference in a new issue