diff options
author | Norbert Preining <preining@logic.at> | 2008-05-06 06:27:59 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-05-06 06:27:59 +0000 |
commit | 120b269bc3ccbfaa32800cd27a39b053f810c266 (patch) | |
tree | 9546bbf17e90f86c7e12867c871b18b25a8c8984 /Master/tlpkg/TeXLive | |
parent | 2f9f5629b2cde3588e8449059524f7aa7e549e94 (diff) |
create package 00texlive-installation.config already in the Master
make changes that running from checkout is working
git-svn-id: svn://tug.org/texlive/trunk@7888 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPDB.pm | 92 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLPSRC.pm | 2 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLUtils.pm | 2 |
3 files changed, 25 insertions, 71 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 { diff --git a/Master/tlpkg/TeXLive/TLPSRC.pm b/Master/tlpkg/TeXLive/TLPSRC.pm index c1cf75656a1..b0272bb68ea 100644 --- a/Master/tlpkg/TeXLive/TLPSRC.pm +++ b/Master/tlpkg/TeXLive/TLPSRC.pm @@ -82,7 +82,7 @@ sub from_file if ($line =~ /^ /) { die "$srcfile: continuation line not allowed in tlpsrc: $line\n"; } - if ($line =~ /^name\s*([-\w]+(\.win32)?|00texlive\..*|0texlive\..*)$/) { + if ($line =~ /^name\s*([-\w]+(\.win32)?|00texlive.*|0texlive.*)$/) { $name = "$1"; $started && die("$srcfile: tlpsrc cannot have two name directives"); $started = 1; diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index 3c1089f8052..0e4ff4713a0 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -698,7 +698,7 @@ gives the extension for the C<lzmadec> binary. sub setup_programs { my ($bindir, $platform) = @_; $::progs{'wget'} = "wget"; - if (!defined($platform)) { + if (!defined($platform) || ($platform eq "")) { # we assume that we run from the DVD, so we can call platform() and # thus also the config.guess script # but we have to setup $::installerdir because that stupid |