summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLPDB.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPDB.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLPDB.pm92
1 files changed, 23 insertions, 69 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm
index 4af36adf753..0c073e86cf7 100644
--- a/Master/tlpkg/TeXLive/TLPDB.pm
+++ b/Master/tlpkg/TeXLive/TLPDB.pm
@@ -771,22 +771,22 @@ sub _set_option_value {
my $pkg = $self->{'tlps'}{'00texlive-installation.config'};
my @newdeps;
if (!defined($pkg)) {
- my $pkg = new TeXLive::TLPOBJ;
- $tlp->name("00texlive-installation.config");
- $tlp->category("TLCore");
- push @newdeps, "$key/$value";
+ $pkg = new TeXLive::TLPOBJ;
+ $pkg->name("00texlive-installation.config");
+ $pkg->category("TLCore");
+ push @newdeps, "$key:$value";
} else {
my $found = 0;
foreach my $d ($pkg->depends) {
- if ($d =~ m!^$key/!) {
+ if ($d =~ m!^$key:!) {
$found = 1;
- push @newdeps, "$key/$value";
+ push @newdeps, "$key:$value";
} else {
push @newdeps, $d;
}
}
if (!$found) {
- push @newdeps, "$key/$value";
+ push @newdeps, "$key:$value";
}
}
$pkg->depends(@newdeps);
@@ -797,7 +797,7 @@ sub _option_value {
my ($self,$key) = @_;
if (defined($self->{'tlps'}{'00texlive-installation.config'})) {
foreach my $d ($self->{'tlps'}{'00texlive-installation.config'}->depends) {
- if ($d =~ m!^$key/(.*)$!) {
+ if ($d =~ m!^$key:(.*)$!) {
return "$1";
}
}
@@ -806,84 +806,38 @@ sub _option_value {
return;
}
-sub _set_option_setting {
- my ($self,$key,$value) = @_;
- my $pkg = $self->{'tlps'}{'00texlive-installation.config'};
- my @newdeps;
- if (!defined($pkg)) {
- my $pkg = new TeXLive::TLPOBJ;
- $tlp->name("00texlive-installation.config");
- $tlp->category("TLCore");
- if ($value) {
- push @newdeps, "$key";
- }
- } else {
- my $found = 0;
- foreach my $d ($pkg->depends) {
- if ($d =~ m!^$key$!) {
- # we have already the setting to true because it is present
- $found = 1;
- if ($value) {
- # we have to keep it true, so push it to the newdeps
- push @newdeps, $d;
- } else {
- # nothing to be done because the setting should be cleared
- }
- } else {
- # this is a different setting, so keep it
- push @newdeps, $d;
- }
- }
- if (!$found && $value) {
- # the setting is not present but we want to have it
- push @newdeps, "$key";
- }
- }
- $pkg->depends(@newdeps);
- $self->{'tlps'}{'00texlive-installation.config'} = $pkg;
-}
-
-sub _option_setting {
- my ($self,$key) = @_;
- if (defined($self->{'tlps'}{'00texlive-installation.config'})) {
- foreach my $d ($self->{'tlps'}{'00texlive-installation.config'}->depends) {
- if ($d =~ m!^$key$!) {
- return 1;
- }
- }
- return 0;
- }
- return 0;
-}
-
sub option_symlinks {
my $self = shift;
- if (@_) { $self->_set_option_setting("symlinks", shift); }
- return $self->_option_setting("symlinks");
+ if (@_) { $self->_set_option_value("symlinks", shift); }
+ return $self->_option_value("symlinks");
}
sub option_docfiles {
my $self = shift;
- if (@_) { $self->_set_option_setting("docfiles", shift); }
- return $self->_option_setting("docfiles");
+ if (@_) { $self->_set_option_value("docfiles", shift); }
+ return $self->_option_value("docfiles");
}
sub option_srcfiles {
my $self = shift;
- if (@_) { $self->_set_option_setting("srcfiles", shift); }
- return $self->_option_setting("srcfiles");
+ if (@_) { $self->_set_option_value("srcfiles", shift); }
+ return $self->_option_value("srcfiles");
}
sub option_formats {
my $self = shift;
- if (@_) { $self->_set_option_setting("formats", shift); }
- return $self->_option_setting("formats");
+ if (@_) { $self->_set_option_value("formats", shift); }
+ return $self->_option_value("formats");
}
-sub option_letter {
+sub option_paper {
my $self = shift;
- if (@_) { $self->_set_option_value("letter", shift); }
- return $self->_option_setting("letter");
+ if (@_) { $self->_set_option_value("paper", shift); }
+ return $self->_option_value("paper");
}
sub option_location {
my $self = shift;
if (@_) { $self->_set_option_value("location", shift); }
+ my $loc = $self->_option_value("location");
+ if ($loc eq "__MASTER__") {
+ return $self->root;
+ }
return $self->_option_value("location");
}
sub option_sys_bin {