summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2017-04-16 02:12:54 +0000
committerNorbert Preining <preining@logic.at>2017-04-16 02:12:54 +0000
commit80b170661b7b5abc3ea0f8264c965faac6374a7d (patch)
treee006da043e05b43a42e272ff53f04f19a7673efc /Master
parentfa3463297d7002eb61ebc188699aa49f1a70e5e9 (diff)
if scheme/collection selection fits, save only scheme info
git-svn-id: svn://tug.org/texlive/trunk@43821 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-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/;