summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLPDB.pm
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/tlpkg/TeXLive/TLPDB.pm
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/tlpkg/TeXLive/TLPDB.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLPDB.pm27
1 files changed, 23 insertions, 4 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm
index e91bea2620d..c9024d7e113 100644
--- a/Master/tlpkg/TeXLive/TLPDB.pm
+++ b/Master/tlpkg/TeXLive/TLPDB.pm
@@ -51,6 +51,8 @@ C<TeXLive::TLPDB> -- A database of TeX Live Packages
$tlpdb->config_revision;
$tlpdb->options;
$tlpdb->option($key, [$value]);
+ $tlpdb->reset_options();
+ $tlpdb->add_default_options();
$tlpdb->settings;
$tlpdb->setting($key, [$value]);
$tlpdb->sizes_of_packages($opt_src, $opt_doc [, @packs ]);
@@ -828,8 +830,8 @@ sub config_src_container {
my $self = shift;
if (defined($self->{'tlps'}{'00texlive.config'})) {
foreach my $d ($self->{'tlps'}{'00texlive.config'}->depends) {
- if ($d eq "container_split_src_files") {
- return 1;
+ if ($d =~ m!^container_split_src_files/(.*)$!) {
+ return "$1";
}
}
}
@@ -849,8 +851,8 @@ sub config_doc_container {
my $self = shift;
if (defined($self->{'tlps'}{'00texlive.config'})) {
foreach my $d ($self->{'tlps'}{'00texlive.config'}->depends) {
- if ($d eq "container_split_doc_files") {
- return 1;
+ if ($d =~ m!^container_split_doc_files/(.*)$!) {
+ return "$1";
}
}
}
@@ -1129,6 +1131,23 @@ sub setting {
return $ret;
}
+sub reset_options {
+ my $self = shift;
+ for my $k (keys %TeXLive::TLConfig::TLPDBOptions) {
+ $self->option($k, $TeXLive::TLConfig::TLPDBOptions{$k}->[1]);
+ }
+}
+
+sub add_default_options {
+ my $self = shift;
+ for my $k (keys %TeXLive::TLConfig::TLPDBOptions) {
+ # if the option is not set already, do set it to defaults
+ if (! $self->option($k) ) {
+ $self->option($k, $TeXLive::TLConfig::TLPDBOptions{$k}->[1]);
+ }
+ }
+}
+
=pod
=item C<< $tlpdb->options >>