summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLPDB.pm
diff options
context:
space:
mode:
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 {