diff options
Diffstat (limited to 'Master/texmf')
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgr.pl | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index 5a18cab7203..0e544ebe073 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -2114,7 +2114,7 @@ sub action_option { next if ($o =~ m/^sys_/); } if (defined $TLPDBOptions{$o}) { - info("$TLPDBOptions{$o}->[2] ($TLPDBOptions{$o}->[1]): " . + info("$TLPDBOptions{$o}->[3] ($TLPDBOptions{$o}->[2]): " . $localtlpdb->option($o) . "\n"); } else { tlwarn ("option $o not supported\n"); @@ -2123,20 +2123,20 @@ sub action_option { } elsif ($what =~ m/^showall$/i) { my %loc = %{$localtlpdb->options}; for my $o (keys %TLPDBOptions) { - info("$TLPDBOptions{$o}->[2] ($TLPDBOptions{$o}->[1]): " . + info("$TLPDBOptions{$o}->[3] ($TLPDBOptions{$o}->[2]): " . (defined($loc{$o}) ? $loc{$o} : "(not set)") . "\n"); } } else { my $found = 0; for my $opt (keys %TLPDBOptions) { - if ($what eq $TLPDBOptions{$opt}->[1]) { + if ($what eq $TLPDBOptions{$opt}->[2]) { $found = 1; # the option argument matches the name my $val = shift @ARGV; if (defined($val)) { # set new value # here we have to care for some special cases - if ($what eq $TLPDBOptions{"location"}->[1]) { + if ($what eq $TLPDBOptions{"location"}->[2]) { # support "ctan" on the cmd line, and don't abs_path it! if ($val =~ m/^ctan$/i) { $val = "$TeXLive::TLConfig::TeXLiveURL"; @@ -2151,18 +2151,18 @@ sub action_option { } info("tlmgr: setting default installation location to $val\n"); $localtlpdb->option($opt, $val); - } elsif ($what eq $TLPDBOptions{"backupdir"}->[1]) { + } elsif ($what eq $TLPDBOptions{"backupdir"}->[2]) { info("tlmgr: setting option $what to $val.\n"); if (! -d $val) { info("tlmgr: the directory $val does not exists, it has to be created\n"); info("tlmgr: before backups can be done automatically.\n"); } $localtlpdb->option($opt, $val); - } elsif ($what eq $TLPDBOptions{"w32_multi_user"}->[1]) { + } elsif ($what eq $TLPDBOptions{"w32_multi_user"}->[2]) { # when running w32 do not allow that a non-admin users sets # this from false to true if (win32() && !admin() && !$val) { - tlwarn("tlmgr: non-admin user cannot set $TLPDBOptions{'w32_multi_user'}->[1] option to true\n"); + tlwarn("tlmgr: non-admin user cannot set $TLPDBOptions{'w32_multi_user'}->[2] option to true\n"); } else { if ($val) { info("tlmgr: setting option $what to 1.\n"); @@ -2221,7 +2221,7 @@ sub action_option { $localtlpdb->save; } else { # show current value - info ("$TLPDBOptions{$opt}->[2] ($TLPDBOptions{$opt}->[1]): " . + info ("$TLPDBOptions{$opt}->[3] ($TLPDBOptions{$opt}->[2]): " . $localtlpdb->option($opt) . "\n"); } last; @@ -2497,13 +2497,10 @@ sub action_recreate_tlpdb { $inst->name("00texlive.installation"); $inst->category("TLCore"); my @deps; - push @deps, "location:$TeXLive::TLConfig::TeXLiveURL"; - push @deps, "opt_create_formats:0"; - push @deps, "opt_sys_bin:/usr/local/bin"; - push @deps, "opt_sys_info:/usr/local/info"; - push @deps, "opt_sys_man:/usr/local/man"; - push @deps, "opt_install_docfiles:0"; - push @deps, "opt_install_srcfiles:0"; + # options are done further down with $tlpdb->reset_options() + #for my $k (keys %TeXLive::TLConfig::TLPDBOptions) { + # push @deps, "opt_$k:" . $TeXLive::TLConfig::TLPDBOptions{k}->[1]; + #} # find list of available archs my @archs; opendir (DIR, "$Master/bin") || die "opendir($Master/bin) failed: $!"; @@ -2518,7 +2515,7 @@ sub action_recreate_tlpdb { debug("Skipping directory $Master/bin/$dirent, no kpsewhich there\n"); } } - push @deps, "available_architectures:" . join(" ",@archs); + push @deps, "setting_available_architectures:" . join(" ",@archs); # we have to find out the default arch # if there is only one dir in $Master/bin then we are settled, # otherwise we expect the user to pass a correct arch string @@ -2528,11 +2525,11 @@ sub action_recreate_tlpdb { # if only one is installed use that one if ($#archs == 0) { # only one arch available, fine, use it as default - push @deps, "platform:$archs[0]"; + push @deps, "setting_platform:$archs[0]"; } else { if (defined($opts{"arch"})) { if (member($opts{"arch"}, @archs)) { - push @deps, "platform:" . $opts{"arch"}; + push @deps, "setting_platform:" . $opts{"arch"}; } else { tlwarn("The architecture you passed in with --arch is not present in $Master/bin\n"); tlwarn("Please specify one from the available ones: @archs\n"); @@ -2546,8 +2543,10 @@ sub action_recreate_tlpdb { } } $inst->depends(@deps); - # now we have all the stuff for 00texlive-installation.config done + # now we have all the stuff for 00texlive.installation done $tlpdb->add_tlpobj($inst); + # reset the options to default values + $tlpdb->reset_options(); # add the other stuff in $Master/tlpkg/tlpobj/*.tlpobj # we can ignore *.{source,doc}.tlpobj because they are already # included in the *.tlpobj parent one at install time |