summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2007-07-12 10:45:17 +0000
committerNorbert Preining <preining@logic.at>2007-07-12 10:45:17 +0000
commit4c5a86b6e3aa31a7649675d3efefac6c364c3db0 (patch)
tree19fcdd1be019cc5ded536867b5f2f375dcf0d08c /Master
parent48e243d72710f0945ec3ac1cf1df148d96a4de0a (diff)
add a function $TLPDB->list_packages that returns a list of all installed
packages git-svn-id: svn://tug.org/texlive/trunk@4571 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/tlpkg/TeXLive/TLPDB.pm13
-rw-r--r--Master/tlpkg/doc/Perl-API.txt3
2 files changed, 15 insertions, 1 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm
index cc426df6dcb..a20bf491ba7 100644
--- a/Master/tlpkg/TeXLive/TLPDB.pm
+++ b/Master/tlpkg/TeXLive/TLPDB.pm
@@ -26,6 +26,7 @@ TeXLive::TLPDB - a database of TeX Live Packages
$tlpdb->generate_listfiles([$destdir]);
$tlpdb->add_objpkg($tlpobj);
$tlpdb->get_package("packagename");
+ $tlpdb->list_packages;
$tlpdb->package_revision("packagename");
=head1 DESCRIPTION
@@ -145,7 +146,17 @@ sub get_package {
=pod
-The C<package_revision> functions returns the the revision of the
+The C<list_packages> function returns the list of all included packages.
+
+=cut
+sub list_packages {
+ my $self = shift;
+ return (sort keys %{$self->{'tlps'}});
+}
+
+=pod
+
+The C<package_revision> function returns the the revision of the
package named in the first argument.
=cut
diff --git a/Master/tlpkg/doc/Perl-API.txt b/Master/tlpkg/doc/Perl-API.txt
index b3e2eb139b5..b27c75f9229 100644
--- a/Master/tlpkg/doc/Perl-API.txt
+++ b/Master/tlpkg/doc/Perl-API.txt
@@ -241,6 +241,9 @@ Input/Output
to TLDB->listdir) (could be more than one for
packages with binary files)
+ $tldb->list_packages
+ returns all packages installed
+
TLP interface
$tldb->add_tlpobj($tlp)