diff options
author | Norbert Preining <preining@logic.at> | 2007-12-10 00:06:36 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2007-12-10 00:06:36 +0000 |
commit | 19bdda3e5896455a8506703c4ed5ab6170dbdde5 (patch) | |
tree | d497c22472448f909045a18745d2988293b69a95 /Master/tlpkg/TeXLive/TLPDB.pm | |
parent | d135d43d99dbe0717ddc74114c2f93007887a9f7 (diff) |
- 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
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPDB.pm')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPDB.pm | 25 |
1 files changed, 22 insertions, 3 deletions
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<TeXLive::TLPDB> -- 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<from_file> function initializes the C<TLPDB> 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<http://> or C<ftp://>, the program C<wget> 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); @@ -481,6 +482,24 @@ sub root { =pod +=item C<< $tlpdb->location >> + +The function C<location> returns the location of the actual C<texlive.tlpdb> +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 >> The function C<listdir> allows to read and set the packages variable |