summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLPDB.pm
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-03-20 18:34:02 +0000
committerKarl Berry <karl@freefriends.org>2011-03-20 18:34:02 +0000
commitb6cf76ded2c5eac72ae87d5a1554e9f886698a26 (patch)
tree77dad847fdba991b4be3a9964544e807c2612561 /Master/tlpkg/TeXLive/TLPDB.pm
parent83f853b5069bf9abe30cbbfa23e39c267f2ec57e (diff)
copyright years, doc fixes
git-svn-id: svn://tug.org/texlive/trunk@21770 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPDB.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLPDB.pm54
1 files changed, 28 insertions, 26 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm
index 2138e4e4179..4f6c8fd5415 100644
--- a/Master/tlpkg/TeXLive/TLPDB.pm
+++ b/Master/tlpkg/TeXLive/TLPDB.pm
@@ -1,6 +1,6 @@
# $Id$
# TeXLive::TLPDB.pm - module for using tlpdb files
-# Copyright 2007, 2008, 2009, 2010 Norbert Preining
+# Copyright 2007, 2008, 2009, 2010, 2011 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
@@ -97,14 +97,13 @@ my $_listdir;
C<< TeXLive::TLPDB->new >> creates a new C<TLPDB> object. If the
argument C<root> is given it will be initialized from the respective
-location within $path. If
-C<$path> begins with C<http://> or C<ftp://>, the program C<wget>
-is used to download the file.
-The C<$path> can start with C<file:/> in which case it is treated as
-a file on the filesystem in the usual way.
+location starting at $path. If C<$path> begins with C<http://> or
+C<ftp://>, the program C<wget> is used to download the file. The
+C<$path> can also start with C<file:/> in which case it is treated as a
+file on the filesystem in the usual way.
-Returns either an object of type C<TeXLive::TLPDB>, or undef if the root
-was given but no package could be read from that location.
+Returns an object of type C<TeXLive::TLPDB>, or undef if the root was
+given but no package could be read from that location.
=cut
@@ -118,10 +117,11 @@ sub new {
$_listdir = $params{'listdir'} if defined($params{'listdir'});
bless $self, $class;
if (defined($self->{'root'})) {
- my $nr_packages_read = $self->from_file("$self->{'root'}/$InfraLocation/$DatabaseName");
+ my $nr_packages_read
+ = $self->from_file("$self->{'root'}/$InfraLocation/$DatabaseName");
if ($nr_packages_read == 0) {
- # that is bad, we cannot read anything, so return undef
- return(undef);
+ # that is bad, we didn't read anything, so return undef.
+ return undef;
}
}
return $self;
@@ -221,7 +221,7 @@ sub from_file {
if (defined($self->{'root'})) {
if ($self->{'root'} ne $root_from_path) {
tlwarn("root=$self->{'root'}, root_from_path=$root_from_path\n");
- tlwarn("Initialisation from different location as originally given.\nHope you are sure!\n");
+ tlwarn("Initialization from different location as originally given.\nHope you are sure!\n");
}
} else {
$self->root($root_from_path);
@@ -442,19 +442,20 @@ sub _add_tlpcontainer {
=pod
-=item C<< $tlpdb->get_package("packagename") >>
+=item C<< $tlpdb->get_package("pkgname") >>
-The C<get_package> function returns a reference to a C<TLPOBJ> object
-in case its name the the argument name coincide.
+The C<get_package> function returns a reference to the C<TLPOBJ> object
+corresponding to the I<pkgname>, or undef.
=cut
sub get_package {
my ($self,$pkg) = @_;
if (defined($self->{'tlps'}{$pkg})) {
- return($self->{'tlps'}{$pkg});
+ my $ret = $self->{'tlps'}{$pkg};
+ return $self->{'tlps'}{$pkg};
} else {
- return(undef);
+ return undef;
}
}
@@ -473,20 +474,21 @@ sub list_packages {
=pod
-=item C<< $tlpdb->expand_dependencies >>
-
-This function takes as first argument the target TLPDB and then a list of
-packages and returns the closure of this
-list with respect to the depends operator. (Sorry, that was for
-mathematicians)
+=item C<< $tlpdb->expand_dependencies(["control",] $tlpdb, ($pkgs)) >>
-If the very first argument is "-only-arch" then it expands only dependencies
-of the form .ARCH.
+If the first argument is the string C<"-only-arch">, expands only
+dependencies of the form .ARCH.
-If the very first argument is "-no-collections" then dependencies between
+If the first argument is C<"-no-collections">, then dependencies between
"same-level" packages (scheme onto scheme, collection onto collection,
package onto package) are ignored.
+The next (or first) argument is the target TLPDB, then a list of
+packages.
+
+We return the closure of the package list with respect to the depends
+operator. (Sorry, that was for mathematicians.)
+
=cut
sub expand_dependencies {