summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2017-10-27 04:21:47 +0000
committerNorbert Preining <preining@logic.at>2017-10-27 04:21:47 +0000
commit9e043b93fc4f0da1dfca3d1f4fb8026561470cf8 (patch)
tree05fb487eaebf310da6fa4074ceca726f6aa00637 /Master/tlpkg/TeXLive
parentda23291b51d577b5b2c8e35a41b01159b7a1e7de (diff)
rework (again) location of various configuration options
Currently opt_frozen is set in 00texlive.installation and thus was in principle targeted for user editing. Furthermore, it wasn't a defined key in TLConfig::TLPDBOptions. The frozen setting has now moved in 00texlive.config.tlpsrc, which also defines the container format etc, thus the proper place. At the same time we cleared out 00texlive.installation.tlpsrc, it is not necessary anymore, and only carried wrong information. All the defaults for options/settings in 00texlive.installation are now defined in TLConfig. git-svn-id: svn://tug.org/texlive/trunk@45617 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r--Master/tlpkg/TeXLive/TLConfig.pm2
-rw-r--r--Master/tlpkg/TeXLive/TLPDB.pm29
-rw-r--r--Master/tlpkg/TeXLive/TLPOBJ.pm36
3 files changed, 48 insertions, 19 deletions
diff --git a/Master/tlpkg/TeXLive/TLConfig.pm b/Master/tlpkg/TeXLive/TLConfig.pm
index d9f97d9a859..5d7634cfaab 100644
--- a/Master/tlpkg/TeXLive/TLConfig.pm
+++ b/Master/tlpkg/TeXLive/TLConfig.pm
@@ -108,12 +108,14 @@ our $DefaultContainerFormat = "xz";
our $DefaultContainerExtension = "tar.$DefaultContainerFormat";
# archive (not user) settings.
+# these can be overriden by putting them into 00texlive.config.tlpsrc
our %TLPDBConfigs = (
"container_split_src_files" => 1,
"container_split_doc_files" => 1,
"container_format" => $DefaultContainerFormat,
"minrelease" => $MinRelease,
"release" => $ReleaseYear,
+ "frozen" => 0,
);
# definition of the option strings and their value types
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm
index b34650c84e3..cff1cfad2b7 100644
--- a/Master/tlpkg/TeXLive/TLPDB.pm
+++ b/Master/tlpkg/TeXLive/TLPDB.pm
@@ -59,6 +59,7 @@ C<TeXLive::TLPDB> -- A database of TeX Live Packages
$tlpdb->config_release;
$tlpdb->config_minrelease;
$tlpdb->config_revision;
+ $tlpdb->config_frozen;
$tlpdb->options;
$tlpdb->option($key, [$value]);
$tlpdb->reset_options();
@@ -1299,7 +1300,7 @@ sub config_doc_container {
=pod
-=item C<< $tlpdb->config_doc_container >>
+=item C<< $tlpdb->config_container_format >>
Returns the currently set default container format. See Options below.
@@ -1375,6 +1376,32 @@ sub config_minrelease {
return;
}
+=pod
+
+=item C<< $tlpdb->config_frozen >>
+
+Returns true if the location is frozen.
+
+=cut
+
+sub config_frozen {
+ my $self = shift;
+ my $tlp;
+ if ($self->is_virtual) {
+ $tlp = $self->{'tlpdbs'}{'main'}->get_package('00texlive.config');
+ } else {
+ $tlp = $self->{'tlps'}{'00texlive.config'};
+ }
+ if (defined($tlp)) {
+ foreach my $d ($tlp->depends) {
+ if ($d =~ m!^frozen/(.*)$!) {
+ return "$1";
+ }
+ }
+ }
+ return;
+}
+
=pod
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm
index 1530c1a06c8..6ff4908c0f8 100644
--- a/Master/tlpkg/TeXLive/TLPOBJ.pm
+++ b/Master/tlpkg/TeXLive/TLPOBJ.pm
@@ -1177,6 +1177,18 @@ sub _parse_hyphen_execute {
# member access functions
#
+sub _set_get_array_value {
+ my $self = shift;
+ my $key = shift;
+ if (@_) {
+ if (defined($_[0])) {
+ $self->{$key} = [ @_ ];
+ } else {
+ $self->{$key} = [ ];
+ }
+ }
+ return @{ $self->{$key} };
+}
sub name {
my $self = shift;
if (@_) { $self->{'name'} = shift }
@@ -1213,9 +1225,7 @@ sub catalogue {
return $self->{'catalogue'};
}
sub srcfiles {
- my $self = shift;
- if (@_) { $self->{'srcfiles'} = [ @_ ] }
- return @{ $self->{'srcfiles'} };
+ _set_get_array_value(shift, "srcfiles", @_);
}
sub containersize {
my $self = shift;
@@ -1280,9 +1290,7 @@ sub remove_srcfiles {
$self->remove_files("src",@files);
}
sub docfiles {
- my $self = shift;
- if (@_) { $self->{'docfiles'} = [ @_ ] }
- return @{ $self->{'docfiles'} };
+ _set_get_array_value(shift, "docfiles", @_);
}
sub clear_docfiles {
my $self = shift;
@@ -1338,9 +1346,7 @@ sub remove_binfiles {
$self->{'binfiles'}{$arch} = [ @finalfiles ];
}
sub runfiles {
- my $self = shift;
- if (@_) { $self->{'runfiles'} = [ @_ ] }
- return @{ $self->{'runfiles'} };
+ _set_get_array_value(shift, "runfiles", @_);
}
sub clear_runfiles {
my $self = shift;
@@ -1360,19 +1366,13 @@ sub remove_runfiles {
$self->remove_files("run",@files);
}
sub depends {
- my $self = shift;
- if (@_) { $self->{'depends'} = [ @_ ] }
- return @{ $self->{'depends'} };
+ _set_get_array_value(shift, "depends", @_);
}
sub executes {
- my $self = shift;
- if (@_) { $self->{'executes'} = [ @_ ] }
- return @{ $self->{'executes'} };
+ _set_get_array_value(shift, "executes", @_);
}
sub postactions {
- my $self = shift;
- if (@_) { $self->{'postactions'} = [ @_ ] }
- return @{ $self->{'postactions'} };
+ _set_get_array_value(shift, "postactions", @_);
}
sub containerdir {
my @self = shift;