summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm12
1 files changed, 10 insertions, 2 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 35213e279..605dcb86e 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -913,7 +913,15 @@ sub install($$$;$$) {
}
--$nb; #- make sure the package is not taken into account as its medium is not selected.
}
- } while (scalar(@transToInstall) == 0); #- avoid null transaction, it a nop that cost a bit.
+ } while ($nb > 0 && scalar(@transToInstall) == 0); #- avoid null transaction, it a nop that cost a bit.
+ }
+
+ #- added to exit typically after last media unselected.
+ if ($nb == 0 && scalar(@transToInstall) == 0) {
+ cleanHeaders($prefix);
+
+ loopback::save_boot($loop_boot);
+ return;
}
#- extract headers for parent as they are used by callback.
@@ -1001,7 +1009,7 @@ sub install($$$;$$) {
c::headerFree(delete $_->{header}) foreach @transToInstall;
cleanHeaders($prefix);
- if (my @badpkgs = grep { !packageFlagInstalled($_) } @transToInstall) {
+ if (my @badpkgs = grep { !packageFlagInstalled($_) && $_->{medium}{selected} } @transToInstall) {
foreach (@badpkgs) {
log::l("bad package $_->{file}");
packageSetFlagSelected($_, 0);