texlive[45617] Master: rework (again) location of various

commits+preining at tug.org commits+preining at tug.org
Fri Oct 27 06:21:47 CEST 2017


Revision: 45617
          http://tug.org/svn/texlive?view=revision&revision=45617
Author:   preining
Date:     2017-10-27 06:21:47 +0200 (Fri, 27 Oct 2017)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl
    trunk/Master/tlpkg/TeXLive/TLConfig.pm
    trunk/Master/tlpkg/TeXLive/TLPDB.pm
    trunk/Master/tlpkg/TeXLive/TLPOBJ.pm
    trunk/Master/tlpkg/doc/00texlive-packages.txt
    trunk/Master/tlpkg/tlpsrc/00texlive.config.tlpsrc

Removed Paths:
-------------
    trunk/Master/tlpkg/tlpsrc/00texlive.installation.tlpsrc

Modified: trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl	2017-10-27 00:22:13 UTC (rev 45616)
+++ trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl	2017-10-27 04:21:47 UTC (rev 45617)
@@ -6752,7 +6752,7 @@
   }
 
   # check for being frozen
-  if ($remotetlpdb->option("frozen")) {
+  if ($remotetlpdb->config_frozen) {
     my $frozen_msg = <<FROZEN;
 TeX Live $TeXLive::TLConfig::ReleaseYear is frozen forever and will no
 longer be updated.  This happens in preparation for a new release.

Modified: trunk/Master/tlpkg/TeXLive/TLConfig.pm
===================================================================
--- trunk/Master/tlpkg/TeXLive/TLConfig.pm	2017-10-27 00:22:13 UTC (rev 45616)
+++ trunk/Master/tlpkg/TeXLive/TLConfig.pm	2017-10-27 04:21:47 UTC (rev 45617)
@@ -108,6 +108,7 @@
 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,
@@ -114,6 +115,7 @@
   "container_format" => $DefaultContainerFormat,
   "minrelease" => $MinRelease,
   "release" => $ReleaseYear,
+  "frozen" => 0,
 );
 
 # definition of the option strings and their value types 

Modified: trunk/Master/tlpkg/TeXLive/TLPDB.pm
===================================================================
--- trunk/Master/tlpkg/TeXLive/TLPDB.pm	2017-10-27 00:22:13 UTC (rev 45616)
+++ trunk/Master/tlpkg/TeXLive/TLPDB.pm	2017-10-27 04:21:47 UTC (rev 45617)
@@ -59,6 +59,7 @@
   $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 @@
 
 =pod
 
-=item C<< $tlpdb->config_doc_container >>
+=item C<< $tlpdb->config_container_format >>
 
 Returns the currently set default container format. See Options below.
 
@@ -1375,7 +1376,33 @@
   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
 
 =item C<< $tlpdb->config_revision >>

Modified: trunk/Master/tlpkg/TeXLive/TLPOBJ.pm
===================================================================
--- trunk/Master/tlpkg/TeXLive/TLPOBJ.pm	2017-10-27 00:22:13 UTC (rev 45616)
+++ trunk/Master/tlpkg/TeXLive/TLPOBJ.pm	2017-10-27 04:21:47 UTC (rev 45617)
@@ -1177,6 +1177,18 @@
 

 # 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 @@
   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 @@
   $self->remove_files("src", at 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 @@
   $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 @@
   $self->remove_files("run", at 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;

Modified: trunk/Master/tlpkg/doc/00texlive-packages.txt
===================================================================
--- trunk/Master/tlpkg/doc/00texlive-packages.txt	2017-10-27 00:22:13 UTC (rev 45616)
+++ trunk/Master/tlpkg/doc/00texlive-packages.txt	2017-10-27 04:21:47 UTC (rev 45617)
@@ -7,17 +7,18 @@
 itself.
 
 Supported settings:
-	container_split_src_files	$tlpdb->config_src_container
-	container_split_doc_files	$tlpdb->config_doc_container
-	container_format/xz		$tlpdb->config_container_format
-	release/NNNN			$tlpdb->config_release
-	revision/NNNNNN			$tlpdb->cofnig_revision
+        container_split_src_files   $tlpdb->config_src_container
+        container_split_doc_files   $tlpdb->config_doc_container
+        container_format/xz         $tlpdb->config_container_format
+        release/NNNN                $tlpdb->config_release
+        revision/NNNNNN             $tlpdb->config_revision
+        frozen/[01]                 $tlpdb->config_frozen
 
 Used in install-tl and tlmgr to determine the "abilities" (split container)
 and release of the remote tlpdb.
 
 Origin of the fields is 
-	%TeXLive::TLConfig::TLPDBConfigs
+        %TeXLive::TLConfig::TLPDBConfigs
 plus TLMedia->revision for the revision field.
 
 The values are set by tlpkg/bin/tl-update-tlnet (and tlpsrc2tlpdb) in the
@@ -62,27 +63,27 @@
 the DVD can be mounted anywhere and we want the installer to work.
 
 Access to the fields:
-	$tlpdb->option("name"[, "val"]);
-	$tlpdb->setting("name");
+        $tlpdb->option("name"[, "val"]);
+        $tlpdb->setting("name");
 
 Currently supported:
-	opt_location:__MASTER__
-	opt_paper:a4
-	opt_create_formats:1
-	opt_desktop_integration:1
-	opt_file_assocs:1
-	opt_post_code:1
-	opt_w32_multi_user:1
-	opt_path:0
-	opt_sys_bin:/usr/local/bin
-	opt_sys_info:/usr/local/info
-	opt_sys_man:/usr/local/man
-	opt_install_docfiles:1
-	opt_install_srcfiles:1
-	opt_frozen:0
+        opt_location:__MASTER__
+        opt_paper:a4
+        opt_create_formats:1
+        opt_desktop_integration:1
+        opt_file_assocs:1
+        opt_post_code:1
+        opt_w32_multi_user:1
+        opt_path:0
+        opt_sys_bin:/usr/local/bin
+        opt_sys_info:/usr/local/info
+        opt_sys_man:/usr/local/man
+        opt_install_docfiles:1
+        opt_install_srcfiles:1
+        opt_frozen:0
 
-	setting_available_architectures:arch1 arch2 arch3 ...
-	setting_platform:arch
+        setting_available_architectures:arch1 arch2 arch3 ...
+        setting_platform:arch
 
 
 Origin of the fields: 

Modified: trunk/Master/tlpkg/tlpsrc/00texlive.config.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/00texlive.config.tlpsrc	2017-10-27 00:22:13 UTC (rev 45616)
+++ trunk/Master/tlpkg/tlpsrc/00texlive.config.tlpsrc	2017-10-27 04:21:47 UTC (rev 45617)
@@ -16,6 +16,8 @@
 longdesc repository is valid, i.e., a release of ZZZZ or later can
 longdesc theoretically be upgraded. Further information concerning
 longdesc upgrades can be found at http://www.tug.org/texlive/upgrade.html
+longdesc
+longdesc frozen/[01] specifies whether the release has been frozen
 longdesc 
 longdesc These values are taken from TeXLive::TLConfig::TLPDBConfigs
 longdesc hash values at tlpdb creation time. (The 00texlive.config.tlpsrc

Deleted: trunk/Master/tlpkg/tlpsrc/00texlive.installation.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/00texlive.installation.tlpsrc	2017-10-27 00:22:13 UTC (rev 45616)
+++ trunk/Master/tlpkg/tlpsrc/00texlive.installation.tlpsrc	2017-10-27 04:21:47 UTC (rev 45617)
@@ -1,49 +0,0 @@
-category TLCore
-shortdesc TeX Live configuration settings
-longdesc This package serves two purposes:
-longdesc
-longdesc 1. at installation time the present values are taken as default for
-longdesc    the installer
-longdesc
-longdesc 2. on an installed system it serves as a configuration file.
-longdesc    We have to remember these settings for additional package
-longdesc    installation, removal, etc.
-longdesc 
-longdesc In this tlpsrc, the only options listed are those that are used
-longdesc *ONLY* at installation time.  These are saved in the local
-longdesc tlpdb and will not be accessible by tlmgr.
-longdesc
-longdesc All other options are set from TLConfig::TLPDBOptions to the 
-longdesc default values specified there.
-longdesc
-longdesc There are two types here:
-longdesc 1) If the key starts with opt_ this is an option that can be
-longdesc    set by the user either at installation time or via tlmgr later.
-longdesc 2) If the key starts with setting_ this value cannot be changed
-longdesc    by the user directly with tlmgr, but only by other actions.
-longdesc    Currently there are only two settings supported, and the second
-longdesc    is only used in unusual cases:
-longdesc   2a) setting_available_architectures lists all available platforms
-longdesc       and should be always present
-longdesc   2b) setting_platform *overrides* the auto-detected platform.
-longdesc       This value will only be present when you forced a specific 
-longdesc       architecture with -force-arch to install-tl
-longdesc
-longdesc The value of __MASTER__ for the location field tells the
-longdesc installer to use the present directory itself.  For example,
-longdesc the DVD can be mounted anywhere and we want the installer to work.
-longdesc
-longdesc Concerning the 00* names:
-longdesc All packages starting with 00texlive are ``virtual packages'',
-longdesc in the sense that no containers are generated and these packages
-longdesc are never split into .src and .doc sub-packages in the tlpdb.
-
-depend opt_paper:a4
-depend opt_path:0
-depend opt_adjustrepo:1
-depend opt_write18_restricted:1
-
-# the day we want to freeze a release forever (i.e., before the final
-# tlnet update), set this to 1 and tlmgr will then bail out saying that
-# TLNNNN is frozen.
-depend opt_frozen:0



More information about the tex-live-commits mailing list