summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2017-04-16 02:14:13 +0000
committerNorbert Preining <preining@logic.at>2017-04-16 02:14:13 +0000
commiteb8037cfc3f3c127ac91056ac602cff96610bb54 (patch)
treedda32ecc36ef7c67e59bd900469cc6caa2c8687e
parentefbb8161f75b4b347656e7fd5f621960b3c3e0aa (diff)
dd backward compatibility when reading profiles
git-svn-id: svn://tug.org/texlive/trunk@43832 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/install-tl19
1 files changed, 15 insertions, 4 deletions
diff --git a/Master/install-tl b/Master/install-tl
index 2368ff9f6d7..e3e3469e2db 100755
--- a/Master/install-tl
+++ b/Master/install-tl
@@ -1794,6 +1794,19 @@ sub create_profile {
sub read_profile {
my $profilepath = shift;
my %opts = @_;
+ my %keyrename = (
+ 'option_sys_bin' => 'tlpdbopt_sys_bin',
+ 'option_sys_man' => 'tlpdbopt_sys_man',
+ 'option_sys_info' => 'tlpdbopt_sys_info',
+ 'option_doc' => 'tlpdbopt_install_docfiles',
+ 'option_src' => 'tlpdbopt_install_srcfiles',
+ 'option_fmt' => 'tlpdbopt_create_formats',
+ 'option_path' => 'instopt_path',
+ 'option_letter' => 'instopt_letter',
+ 'option_adjustrepo' => 'instopt_adjustrepo',
+ 'portable' => 'instopt_portable',
+ );
+
open PROFILE, "<$profilepath"
or die "$0: Cannot open profile $profilepath for reading.\n";
# %pro is used to see whether there are non-recognized keys,
@@ -1805,6 +1818,8 @@ sub read_profile {
next if m/^[[:space:]]*$/; # skip empty lines
next if m/^[[:space:]]*#/; # skip comment lines
my ($k,$v) = split (" ", $_, 2); # value might have spaces
+ # convert old keys to new keys
+ $k = $keyrename{$k} if ($keyrename{$k});
$pro{$k} = $v;
$profiledata{$k} = $v;
}
@@ -1843,10 +1858,6 @@ sub read_profile {
}
}
#
- # TODO
- # for backward compatibility, check for name changes of options
- #
- #
# if there are still keys in the %pro array, some unknown keys have
# been written in the profile, bail out
if (my @foo = keys(%pro)) {