diff options
author | Norbert Preining <preining@logic.at> | 2007-11-21 08:21:57 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2007-11-21 08:21:57 +0000 |
commit | 2b361a5e7b7a1b88e29aec64e61b640e145691b6 (patch) | |
tree | 64df7ec67d7b244973ed1b82de432e05eeb1cb62 /Master/tlpkg/TeXLive | |
parent | cd8265b6b26c31db75be3251a1cdd336e1f12eec (diff) |
some fixes to TLPDB for new location of texlive.tlpdb
git-svn-id: svn://tug.org/texlive/trunk@5534 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPDB.pm | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm index 7dd1fbb6a59..54295c5d07f 100644 --- a/Master/tlpkg/TeXLive/TLPDB.pm +++ b/Master/tlpkg/TeXLive/TLPDB.pm @@ -26,7 +26,7 @@ C<TeXLive::TLPDB> -- A database of TeX Live Packages $tlpdb->writeout(FILEHANDLE); $tlpdb->save; $tlpdb->available_architectures(); - $tlpdb->add_tlpcontainer("foobar.ext" [, "destination" ] ); + $tlpdb->add_tlpcontainer($pkg, $ziploc [, $archrefs [, $dest ]] ); $tlpdb->add_tlpobj($tlpobj); $tlpdb->get_package("packagename"); $tlpdb->list_packages; @@ -223,9 +223,14 @@ sub _add_tlpcontainer { my ($self, $package, $ziplocation, $arch, $dest) = @_; my $unpackprog; my $args; - # THIS IS NOW A STRONG ASSUMPTION!!! - # The base of the installation is dirname($self->location)!!! - if (not(defined($dest))) { $dest = TeXLive::TLUtils::dirname($self->location) ; } + # WARNING: If you change the location of the texlive.tlpdb this + # has to be changed, too!! + if (not(defined($dest))) { + my $cwd = getcwd; + chdir($self->location . "/.."); + $dest = getcwd; + chdir($cwd); + } my $container = "$ziplocation/$package"; if ($arch ne "all") { $container .= ".$arch"; @@ -248,7 +253,7 @@ sub _add_tlpcontainer { # we only create/add tlpobj for arch eq "all" if ($arch eq "all") { my $tlpobj = new TeXLive::TLPOBJ; - $tlpobj->from_file("$dest/.tlpobj/$package.tlpobj"); + $tlpobj->from_file("$dest/$TeXLive::TLConfig::InfraLocation/tlpobj/$package.tlpobj"); $self->add_tlpobj($tlpobj); return $tlpobj; } |