return immediately if nothing to do in download, extract and essential stages

pull/1/head
parent c0ee8c82db
commit e1d0a17751
Signed by: josch
GPG Key ID: F2CBA5C78FBD83E1

@ -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…
Cancel
Save