From ba17b2ea7260e7c0f859347a24ddc83f0e5e697f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 6 Oct 2009 00:23:51 +0000 Subject: TeXCatalogue: less debugging TLPSRC, TLPOBJ: set format_lines_per_page on the right file handle tl-update-tlpdb: rename a couple options, mess with doc tl-update-bindir: cygwin location git-svn-id: svn://tug.org/texlive/trunk@15651 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLPOBJ.pm | 4 ++-- Master/tlpkg/TeXLive/TLPSRC.pm | 14 +++++++------- Master/tlpkg/TeXLive/TeXCatalogue.pm | 6 ++++-- 3 files changed, 13 insertions(+), 11 deletions(-) (limited to 'Master/tlpkg/TeXLive') diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm index c0c2dcb5066..0a2eae5bcfa 100644 --- a/Master/tlpkg/TeXLive/TLPOBJ.pm +++ b/Master/tlpkg/TeXLive/TLPOBJ.pm @@ -331,10 +331,10 @@ sub writeout { # ugly hack to get rid of use FileHandle; see man perlform #format_name $fd "multilineformat"; select((select($fd),$~ = "multilineformat")[0]); - $= = 99999; # no pages in this format + $fd->format_lines_per_page (99999); # no pages in this format if (defined($self->{'longdesc'})) { $_tmp = "$self->{'longdesc'}"; - write $fd; + write $fd; # use that multilineformat } if (defined($self->{'depends'})) { foreach (@{$self->{'depends'}}) { diff --git a/Master/tlpkg/TeXLive/TLPSRC.pm b/Master/tlpkg/TeXLive/TLPSRC.pm index da7d1861f68..622362653cb 100644 --- a/Master/tlpkg/TeXLive/TLPSRC.pm +++ b/Master/tlpkg/TeXLive/TLPSRC.pm @@ -183,14 +183,14 @@ sub writeout my $self = shift; my $fd = (@_ ? $_[0] : STDOUT); format_name $fd "multilineformat"; - $= = 99999; # no pages in this format + $fd->format_lines_per_page (99999); # no pages in this format print $fd "name ", $self->name, "\n"; print $fd "category ", $self->category, "\n"; defined($self->{'catalogue'}) && print $fd "catalogue $self->{'catalogue'}\n"; defined($self->{'shortdesc'}) && print $fd "shortdesc $self->{'shortdesc'}\n"; if (defined($self->{'longdesc'})) { $_tmp = "$self->{'longdesc'}"; - write $fd; + write $fd; # use that multilineformat } if (defined($self->{'depends'})) { foreach (@{$self->{'depends'}}) { @@ -491,18 +491,18 @@ sub find_default_patterns } for my $cat (keys %autopatterns) { - debug ("Category $cat\n"); + ddebug ("Category $cat\n"); for my $d (@{$autopatterns{$cat}{"bin"}}) { - debug ("Found auto bin pattern $d\n"); + ddebug ("auto bin pattern $d\n"); } for my $d (@{$autopatterns{$cat}{"src"}}) { - debug ("Found auto src pattern $d\n"); + ddebug ("auto src pattern $d\n"); } for my $d (@{$autopatterns{$cat}{"doc"}}) { - debug ("Found auto doc pattern $d\n"); + ddebug ("auto doc pattern $d\n"); } for my $d (@{$autopatterns{$cat}{"run"}}) { - debug ("Found auto run pattern $d\n"); + ddebug ("auto run pattern $d\n"); } } diff --git a/Master/tlpkg/TeXLive/TeXCatalogue.pm b/Master/tlpkg/TeXLive/TeXCatalogue.pm index 10ca161ff83..8ff06b08040 100644 --- a/Master/tlpkg/TeXLive/TeXCatalogue.pm +++ b/Master/tlpkg/TeXLive/TeXCatalogue.pm @@ -88,7 +88,8 @@ sub initialize { } } -sub beautify{ +sub beautify +{ my ($txt) = @_; $txt =~ s/\n/ /g; $txt =~ s/^[[:space:]]*//g; @@ -181,7 +182,8 @@ sub initialize { # the catalogue.dtd is searched in a/catalogue.dtd etc, see above my $cwd = `pwd`; chomp($cwd); - chdir($self->{'location'} . "/entries") || die ("Cannot chdir to TeX Catalogue entries: $!"); + chdir($self->{'location'} . "/entries") + || die "chdir($self->{location}/entries failed: $!"; # parse all the files foreach (glob("?/*.xml")) { open(my $io,"<$_") or die "Cannot read $_: $!"; -- cgit v1.2.3