summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-08-05 16:19:41 +0000
committerNorbert Preining <preining@logic.at>2009-08-05 16:19:41 +0000
commitedd31659b22ab4d3718918fca2ac2506fe118474 (patch)
tree55a9f86d0262db51a6e5c31c960c98ca1eeefbd1 /Master/texmf
parent272f667ff1987bad105a0f13f0337e9813671862 (diff)
move all the options from the .tlpsrc files to hashes in TLConfig
and initialize the respective tlpobjs (00texlive.installation and 00texlive.config) from the values in these hashes. Update tl-update-tlpdb to use that, and add some comments to the tlpsrc files git-svn-id: svn://tug.org/texlive/trunk@14542 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl37
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