From 19bdda3e5896455a8506703c4ed5ab6170dbdde5 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 10 Dec 2007 00:06:36 +0000 Subject: - add TLPDB->location - fix texlive.tlpdb - rework the dependency resolver in install-tl.pl git-svn-id: svn://tug.org/texlive/trunk@5738 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLPDB.pm | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'Master/tlpkg/TeXLive/TLPDB.pm') diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm index 3aaaff8aded..0fb2400518b 100644 --- a/Master/tlpkg/TeXLive/TLPDB.pm +++ b/Master/tlpkg/TeXLive/TLPDB.pm @@ -34,6 +34,7 @@ C -- A database of TeX Live Packages $tlpdb->fmtutil_cnf_lines; $tlpdb->language_dat_lines; $tlpdb->package_revision("packagename"); + $tlpdb->location; TeXLive::TLPDB->listdir([$dir]); $tlpdb->generate_listfiles([$destdir]); @@ -98,7 +99,7 @@ sub add_tlpobj { =item C<< $tlpdb->from_file($filename) >> The C function initializes the C in case the -location was not given at generation time. If C<$filename> begins +root was not given at generation time. If C<$filename> begins with C or C, the program C is used to download the file. @@ -168,8 +169,8 @@ as location. If the location is undefined, die. sub save { my $self = shift; - my $path = "$self->{'root'}/$InfraLocation/$DatabaseName"; - mkdirhier("$self->{'root'}/$InfraLocation"); + my $path = $self->location; + mkdirhier(dirname($path)); open(FOO,">$path") || die("Cannot open $path for writing: $!"); $self->writeout(\*FOO); close(FOO); @@ -479,6 +480,24 @@ sub root { return $self->{'root'}; } +=pod + +=item C<< $tlpdb->location >> + +The function C returns the location of the actual C +file used. Note that this is a read-only function, you cannot change +the root of the TLPDB using this function. + +=cut + +sub location { + my $self = shift; + return "$self->{'root'}/$InfraLocation/$DatabaseName"; +} + +=pod + + =pod =item C<< $tlpdb->listdir >> -- cgit v1.2.3