summaryrefslogtreecommitdiff
path: root/Master
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
parent83f853b5069bf9abe30cbbfa23e39c267f2ec57e (diff)
copyright years, doc fixes
git-svn-id: svn://tug.org/texlive/trunk@21770 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/tlpkg/TeXLive/TLConfFile.pm2
-rw-r--r--Master/tlpkg/TeXLive/TLPDB.pm54
-rw-r--r--Master/tlpkg/TeXLive/TLPOBJ.pm25
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm4
4 files changed, 45 insertions, 40 deletions
diff --git a/Master/tlpkg/TeXLive/TLConfFile.pm b/Master/tlpkg/TeXLive/TLConfFile.pm
index 74eceaf1dca..2f51ec42cb2 100644
--- a/Master/tlpkg/TeXLive/TLConfFile.pm
+++ b/Master/tlpkg/TeXLive/TLConfFile.pm
@@ -1,6 +1,6 @@
# $Id$
# TeXLive::TLConfFile.pm - reading and writing conf files
-# Copyright 2010 Norbert Preining
+# Copyright 2010, 2011 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
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 {
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm
index d08fba3595a..b73ee0e3cff 100644
--- a/Master/tlpkg/TeXLive/TLPOBJ.pm
+++ b/Master/tlpkg/TeXLive/TLPOBJ.pm
@@ -1,6 +1,6 @@
# $Id$
# TeXLive::TLPOBJ.pm - module for using tlpobj 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.
@@ -37,11 +37,11 @@ sub new {
catalogue => $params{'catalogue'},
relocated => $params{'relocated'},
runfiles => defined($params{'runfiles'}) ? $params{'runfiles'} : [],
- runsize => $params{'runsize'},
+ runsize => $params{'runsize'},
srcfiles => defined($params{'srcfiles'}) ? $params{'srcfiles'} : [],
- srcsize => $params{'srcsize'},
+ srcsize => $params{'srcsize'},
docfiles => defined($params{'docfiles'}) ? $params{'docfiles'} : [],
- docsize => $params{'docsize'},
+ docsize => $params{'docsize'},
executes => defined($params{'executes'}) ? $params{'executes'} : [],
postactions => defined($params{'postactions'}) ? $params{'postactions'} : [],
# note that binfiles is a HASH with keys of $arch!
@@ -49,7 +49,7 @@ sub new {
binsize => defined($params{'binsize'}) ? $params{'binsize'} : {},
depends => defined($params{'depends'}) ? $params{'depends'} : [],
revision => $params{'revision'},
- cataloguedata => defined($params{'cataloguedata'}) ? $params{'cataloguedata'} : {},
+ cataloguedata => defined($params{'cataloguedata'}) ? $params{'cataloguedata'} : {},
};
$_containerdir = $params{'containerdir'} if defined($params{'containerdir'});
bless $self, $class;
@@ -66,7 +66,6 @@ sub copy {
}
-
sub from_file {
my $self = shift;
if (@_ != 1) {
@@ -83,7 +82,6 @@ sub from_fh {
my $arch;
my $size;
- #while (my $line = $fh->getline) {
while (my $line = <$fh>) {
chomp($line);
# we call tllog only when something will be logged, to speed things up.
@@ -958,8 +956,9 @@ sub all_files {
sub allbinfiles {
my $self = shift;
- my @ret;
+ my @ret = ();
my %binfiles = %{$self->binfiles};
+
foreach my $arch (keys %binfiles) {
push (@ret, @{$binfiles{$arch}});
}
@@ -1521,8 +1520,8 @@ reads a C<tlpobj> file.
=item C<from_fh($filehandle[, $multi])>
read the textual representation of a TLPOBJ from an already opened
-file handle. If C<$multi> is undefined (ie not given) then multiple
-tlpobj in the same file are treated as errors. If C<$multi> is defined
+file handle. If C<$multi> is undef (i.e., not given) then multiple
+tlpobj in the same file are treated as errors. If C<$multi> is defined,
then returns after reading one tlpobj.
Returns C<1> if it found a C<tlpobj>, otherwise C<0>.
@@ -1654,7 +1653,11 @@ at the end with $. Otherwise it is prefix with a / and anchored at the end.
=item C<all_files>
-returns a list of all files of all types.
+returns a list of all files of all types. However, binary files won't
+be found until dependencies have been expanded via (most likely)
+L<TeXLive::TLPDB::expand_dependencies>. For a more or less standalone
+example, see the C<find_old_files> function in the
+script C<Master/tlpkg/libexec/place>.
=item C<allbinfiles>
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index 3b51ca04074..793650e3b24 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -1,6 +1,6 @@
# $Id$
# TeXLive::TLUtils.pm - the inevitable utilities for TeX Live.
-# Copyright 2007, 2008, 2009, 2010 Norbert Preining, Reinhard Kotucha
+# Copyright 2007, 2008, 2009, 2010, 2011 Norbert Preining, Reinhard Kotucha
# This file is licensed under the GNU General Public License version 2
# or any later version.
@@ -3111,7 +3111,7 @@ sub process_logging_options {
=pod
-This function returns a "windowsified" version of its single argument
+This function returns a "Windows-ized" version of its single argument
I<path>, i.e., replaces all forward slashes with backslashes, and adds
an additional C<"> at the beginning and end if I<path> contains any
spaces. It also makes the path absolute. So if $path does not start