summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMaster/install-tl23
1 files changed, 22 insertions, 1 deletions
diff --git a/Master/install-tl b/Master/install-tl
index f7dac723073..67355db087f 100755
--- a/Master/install-tl
+++ b/Master/install-tl
@@ -1730,6 +1730,27 @@ sub create_profile {
open PROFILE, ">$profilepath";
$fh = \*PROFILE;
}
+ #
+ # determine whether the set of selected collections exactly
+ # agrees with the selected scheme. In this case we do *not*
+ # save the actual collection setting but only the selected
+ # scheme, as reading the profile will load all collections
+ # if only the scheme is given.
+ my %instcols;
+ foreach my $key (sort keys %vars) {
+ $instcols{$key} = 1 if $key=~/^collection/ and $vars{$key}==1;
+ }
+ my $scheme=$tlpdb->get_package($vars{'selected_scheme'});
+ if (!defined($scheme)) {
+ die ("Scheme $vars{selected_scheme} not defined.\n");
+ }
+ for my $scheme_content ($scheme->depends) {
+ delete($instcols{"$scheme_content"}) if ($scheme_content=~/^collection-/);
+ }
+ # if there are still collection left, we keep all of them
+ my $save_cols = (keys(%instcols) ? 1 : 0);
+
+ # start
my $tim = gmtime(time);
print $fh "# texlive.profile written on $tim UTC\n";
print $fh "# It will NOT be updated and reflects only the\n";
@@ -1737,7 +1758,7 @@ sub create_profile {
print $fh "selected_scheme $vars{selected_scheme}\n";
foreach my $key (sort keys %vars) {
print $fh "$key $vars{$key}\n"
- if $key=~/^collection/ and $vars{$key}==1;
+ if $save_cols and $key=~/^collection/ and $vars{$key}==1;
print $fh "$key $vars{$key}\n" if $key =~ /^option_/;
print $fh "$key $vars{$key}\n" if (($key =~ /^binary_/) && $vars{$key});
print $fh "$key $vars{$key}\n" if $key =~ /^TEXDIR/;