diff options
author | Norbert Preining <preining@logic.at> | 2014-09-01 00:21:54 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2014-09-01 00:21:54 +0000 |
commit | ae7f88cea79121ec5fdd114164856efb11ed8660 (patch) | |
tree | d8574ba64267a0910ae29f9dfa76f358e1f29bd7 /Master | |
parent | 0ba5190228a7a7ca3ccd8972ddb21abb5ef69b6f (diff) |
make sure that updates carry also new collections
git-svn-id: svn://tug.org/texlive/trunk@35076 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-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"; |