summaryrefslogtreecommitdiff
path: root/Master/tlpkg
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-08-05 15:17:49 +0000
committerNorbert Preining <preining@logic.at>2009-08-05 15:17:49 +0000
commit272f667ff1987bad105a0f13f0337e9813671862 (patch)
treeddf08f061cd0aa0c3d5cb8bd2086b1b5e52934fc /Master/tlpkg
parent036676ef7916ae35aa73e59c91f81ae9272c6ef4 (diff)
merge the bunch of TLPDBOptionsXXXX and TLPDBSettingXXXX into one hash each
git-svn-id: svn://tug.org/texlive/trunk@14541 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r--Master/tlpkg/TeXLive/TLConfig.pm141
-rw-r--r--Master/tlpkg/TeXLive/TLPDB.pm14
2 files changed, 71 insertions, 84 deletions
diff --git a/Master/tlpkg/TeXLive/TLConfig.pm b/Master/tlpkg/TeXLive/TLConfig.pm
index bcf73275a1d..0313be0bf81 100644
--- a/Master/tlpkg/TeXLive/TLConfig.pm
+++ b/Master/tlpkg/TeXLive/TLConfig.pm
@@ -28,15 +28,11 @@ BEGIN {
$TeXLiveURL
@CriticalPackagesList
$CriticalPackagesRegexp
- @AllowedConfigOptions
$WindowsMainMenuName
$RelocPrefix
$RelocTree
- %TLPDBSettingType
- %TLPDBSettingDesc
- %TLPDBOptionType
- %TLPDBOptionDesc
- %TLPDBOptionTlmgrName
+ %TLPDBOptions
+ %TLPDBSettings
);
@EXPORT = @EXPORT_OK;
}
@@ -87,22 +83,6 @@ if ($^O=~/^MSWin(32|64)$/i) {
$CriticalPackagesRegexp = '^(texlive\.infra|tlperl\.win32$)';
}
-our @AllowedConfigOptions = qw/
- available_architectures
- opt_create_symlinks
- opt_create_formats
- opt_paper
- opt_sys_bin
- opt_sys_info
- opt_sys_man
- opt_install_docfiles
- opt_install_srcfiles
- platform
- location
- backupdir
- autobackup
- /;
-
#
# definition of the option strings and their value types
# possible types are:
@@ -117,59 +97,70 @@ our @AllowedConfigOptions = qw/
# WARNING: keep these in sync!
#
-our %TLPDBOptionTlmgrName = (
- "location" => "location",
- "create_formats" => "formats",
- "desktop_integration" => "deskint",
- "file_assocs" => "fileassocs",
- "post_code" => "postcode",
- "sys_bin" => "sys_bin",
- "sys_info" => "sys_info",
- "sys_man" => "sys_man",
- "install_docfiles" => "docfiles",
- "install_srcfiles" => "srcfiles",
- "w32_multi_user" => "multiuser",
- "autobackup" => "autobackup",
- "backupdir" => "backupdir");
-our %TLPDBOptionType = (
- "location" => "u",
- "create_formats" => "b",
- "desktop_integration" => "b",
- "file_assocs" => "n:0..2",
- "post_code" => "b",
- "sys_bin" => "p",
- "sys_info" => "p",
- "sys_man" => "p",
- "install_docfiles" => "b",
- "install_srcfiles" => "b",
- "w32_multi_user" => "b",
- "autobackup" => "n:-1..",
- "backupdir" => "p");
-our %TLPDBOptionDesc = (
- "location" => "Default installation location",
- "create_formats" => "Create formats on installation",
- "desktop_integration" => "Create shortcuts (menu and desktop) in postinst",
- "file_assocs" => "Change file associations in postinst",
- "post_code" => "Run postinst code blobs",
- "sys_bin" => "Destination for symlinks for binaries",
- "sys_info" => "Destination for symlinks for info docs",
- "sys_man" => "Destination for symlinks for man pages",
- "install_docfiles" => "Install documentation files",
- "install_srcfiles" => "Install source files",
- "w32_multi_user" => "Install for shortcuts/menu items for all users (w32)",
- "autobackup" => "Number of backups to keep",
- "backupdir" => "Directory for backups");
-
-our %TLPDBSettingType = (
- "platform" => "s",
- "available_architectures" => "l"
-);
-our %TLPDBSettingDesc = (
- "platform" => "Main platform for this computer",
- "available_architectures" => "All available/installed architectures"
-);
+# $TLPDBOptions{"option"}->[0] --> type
+# ->[1] --> tlmgr name
+# ->[2] --> tlmgr description
+our %TLPDBOptions = (
+ "location" =>
+ [ "u",
+ "location",
+ "Default installation location" ],
+ "create_formats" =>
+ [ "b",
+ "formats",
+ "Create formats on installation" ],
+ "desktop_integration" =>
+ [ "b",
+ "desktop_integration",
+ "Create shortcuts (menu and desktop) in postinst" ],
+ "file_assocs" =>
+ [ "n:0..2",
+ "fileassocs",
+ "Change file associations in postinst" ],
+ "post_code" =>
+ [ "b",
+ "postcode",
+ "Run postinst code blobs" ],
+ "sys_bin" =>
+ [ "p",
+ "sys_bin",
+ "Destination for symlinks for binaries" ],
+ "sys_man" =>
+ [ "p",
+ "sys_man",
+ "Destination for symlinks for man pages" ],
+ "sys_info" =>
+ [ "p",
+ "sys_info",
+ "Destination for symlinks for info docs" ],
+ "install_docfiles" =>
+ [ "b",
+ "docfiles",
+ "Install documentation files" ],
+ "install_srcfiles" =>
+ [ "b",
+ "srcfiles",
+ "Install source files" ],
+ "w32_multi_user" =>
+ [ "b",
+ "multiuser",
+ "Install for shortcuts/menu items for all users (w32)" ],
+ "autobackup" =>
+ [ "n:-1..",
+ "autobackup",
+ "Number of backups to keep" ],
+ "backupdir" =>
+ [ "p",
+ "backupdir",
+ "Directory for backups" ]
+ );
+our %TLPDBSettings = (
+ "platform" => [ "s", "Main platform for this computer" ],
+ "available_architectures" => [ "l", "All available/installed architectures" ]
+);
+
our $WindowsMainMenuName = "TeX Live $ReleaseYear";
@@ -249,10 +240,6 @@ A list of all those packages which we do not update regularly
since they are too central, currently only texlive.infra (and tlperl.win32
for Windows).
-=item C<@TeXLive::TLConfig::AllowedConfigOptions>
-
-A list of a config options that can be set in 00texlive.installation.
-
=item C<$TeXLive::TLConfig::RelocTree>
the texmf-tree name that can be relocated, defaults to "texmf-dist"
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm
index 7f61215f398..e91bea2620d 100644
--- a/Master/tlpkg/TeXLive/TLPDB.pm
+++ b/Master/tlpkg/TeXLive/TLPDB.pm
@@ -64,7 +64,7 @@ C<TeXLive::TLPDB> -- A database of TeX Live Packages
use TeXLive::TLConfig qw($CategoriesRegexp $DefaultCategory $InfraLocation
$DatabaseName $MetaCategoriesRegexp $Archive
- %TLPDBOptionType %TLPDBSettingType);
+ %TLPDBOptions %TLPDBSettings);
use TeXLive::TLUtils qw(dirname mkdirhier member win32 info debug ddebug
tlwarn);
use TeXLive::TLPOBJ;
@@ -1084,7 +1084,7 @@ sub setting_pkg {
my $pkg = shift;
my $key = shift;
if (@_) {
- if ($TLPDBSettingType{$key} eq "l") {
+ if ($TLPDBSettings{$key}->[0] eq "l") {
$self->_set_value_pkg($pkg, "setting_", $key, "@_");
} else {
$self->_set_value_pkg($pkg, "setting_", $key, shift);
@@ -1092,7 +1092,7 @@ sub setting_pkg {
}
my $ret = $self->_value_pkg($pkg, "setting_", $key);
# check the types of the settings, and if it is a "l" return a list
- if ($TLPDBSettingType{$key} eq "l") {
+ if ($TLPDBSettings{$key}->[0] eq "l") {
my @ret;
if (defined $ret) {
@ret = split(" ", $ret);
@@ -1108,7 +1108,7 @@ sub setting {
my $self = shift;
my $key = shift;
if (@_) {
- if ($TLPDBSettingType{$key} eq "l") {
+ if ($TLPDBSettings{$key}->[0] eq "l") {
$self->_set_setting_value($key, "@_");
} else {
$self->_set_setting_value($key, shift);
@@ -1116,7 +1116,7 @@ sub setting {
}
my $ret = $self->_setting_value($key);
# check the types of the settings, and if it is a "l" return a list
- if ($TLPDBSettingType{$key} eq "l") {
+ if ($TLPDBSettings{$key}->[0] eq "l") {
my @ret;
if (defined $ret) {
@ret = split(" ", $ret);
@@ -1158,11 +1158,11 @@ sub _keyshash {
sub options {
my $self = shift;
- return ($self->_keyshash('opt_', \%TLPDBOptionType));
+ return ($self->_keyshash('opt_', \%TLPDBOptions));
}
sub settings {
my $self = shift;
- return ($self->_keyshash('setting_', \%TLPDBSettingType));
+ return ($self->_keyshash('setting_', \%TLPDBSettings));
}
=pod