diff options
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-x | Master/install-tl | 62 |
1 files changed, 57 insertions, 5 deletions
diff --git a/Master/install-tl b/Master/install-tl index 8b70cfa1bf5..78849cfd479 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -1680,9 +1680,40 @@ sub import_settings_from_old_tlpdb { } else { return; } - # first import the collections - # since the scheme is not the final word we select scheme-custom here - # and then set the single collections by hand + ############# OLD CODE ################### + # in former times we sometimes didn't change from scheme-full + # to scheme-custom when deselecting some collections + # this is fixed now. + # + # # first import the collections + # # since the scheme is not the final word we select scheme-custom here + # # and then set the single collections by hand + # $vars{'selected_scheme'} = "scheme-custom"; + # $vars{'n_collections_selected'} = 0; + # # remove the selection of all collections + # foreach my $entry (keys %vars) { + # if ($entry=~/^(collection-.*)/) { + # $vars{"$1"}=0; + # } + # } + # for my $c ($previoustlpdb->collections) { + # my $tlpobj = $tlpdb->get_package($c); + # if ($tlpobj) { + # $vars{$c} = 1; + # ++$vars{'n_collections_selected'}; + # } + # } + ############ END OF OLD CODE ############ + + ############ NEW CODE ################### + # we simply go through all installed schemes, install + # all depending collections + # if we find scheme-full we use this as 'selected_scheme' + # otherwise we use 'scheme_custom' as we don't know + # and there is no total order on the schemes. + # + # we cannot use select_scheme from tlmgr.pl, as this one clears + # previous selctions (hmm :-( $vars{'selected_scheme'} = "scheme-custom"; $vars{'n_collections_selected'} = 0; # remove the selection of all collections @@ -1691,13 +1722,34 @@ sub import_settings_from_old_tlpdb { $vars{"$1"}=0; } } + # now go over all the schemes *AND* collections and select them + foreach my $s ($previoustlpdb->schemes) { + my $tlpobj = $tlpdb->get_package($s); + if ($tlpobj) { + foreach my $e ($tlpobj->depends) { + if ($e =~ /^(collection-.*)/) { + # do not add collections multiple times + if (!$vars{$e}) { + $vars{$e} = 1; + ++$vars{'n_collections_selected'}; + } + } + } + } + } + # Now do the same for collections: for my $c ($previoustlpdb->collections) { my $tlpobj = $tlpdb->get_package($c); if ($tlpobj) { - $vars{$c} = 1; - ++$vars{'n_collections_selected'}; + if (!$vars{$c}) { + $vars{$c} = 1; + ++$vars{'n_collections_selected'}; + } } } + ########### END NEW CODE ############# + + # now take over the path my $oldroot = $previoustlpdb->root; my $newroot = abs_path("$oldroot/..") . "/$texlive_release"; |