From 67635f11d8ff1b4f0417ad651f2bc10d1d2e09c5 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 20 Apr 2020 22:45:46 +0000 Subject: tlpkg-ctan-check: avoid catalogue update for every package; other doc and syntax tweaks, etc. git-svn-id: svn://tug.org/texlive/trunk@54820 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/bin/c2l | 2 +- Master/tlpkg/bin/ctan2tl | 2 +- Master/tlpkg/bin/tlpkg-ctan-check | 8 ++++---- Master/tlpkg/bin/tlpkginfo | 6 +++++- 4 files changed, 11 insertions(+), 7 deletions(-) (limited to 'Master/tlpkg/bin') diff --git a/Master/tlpkg/bin/c2l b/Master/tlpkg/bin/c2l index 91047a7bca5..c7356d53695 100755 --- a/Master/tlpkg/bin/c2l +++ b/Master/tlpkg/bin/c2l @@ -103,7 +103,7 @@ sub main { push (@msgs, grep { /^svn: E/ } @lines); # svn errors push (@msgs, grep { /: no hit for pattern/ } @lines); # tlpsrc updates # map file changes; should do better, check .tlpsrc for existing ... - push (@msgs, grep { /(svn .*|^ )[A-z]*\.map/ } @lines); + push (@msgs, grep { /(svn .*|^ )[A-z]*\.map$/ } @lines); print map { (/^\*/ ? "" : "*** ") . $_ } @msgs; if ($status != 0) { diff --git a/Master/tlpkg/bin/ctan2tl b/Master/tlpkg/bin/ctan2tl index f7c1774dda2..6ff758d5945 100755 --- a/Master/tlpkg/bin/ctan2tl +++ b/Master/tlpkg/bin/ctan2tl @@ -83,7 +83,7 @@ fi if $copy_from_ctan; then ctan_dir=`tlpkginfo --prepare $pkg` else - ctan_dir="$pkg" + ctan_dir=$pkg fi if test -z "$ctan_dir"; then diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index ed969d6f7df..f8664c53f30 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -1013,7 +1013,7 @@ sub do_tlp { return 1; } - chomp (my $ctan_dir = `$mydir/tlpkginfo --prepare '$tlpn'`); + chomp (my $ctan_dir = `$mydir/tlpkginfo --no-catalogue --prepare '$tlpn'`); if (! $ctan_dir) { warn "$0: oops, no CTAN directory for $tlpn, fix fix\n"; return 1; @@ -1032,7 +1032,7 @@ sub do_tlp { # and factor it out from here and ctan2tds. if ($tlpn eq "cs") { $TMPDIR = $ENV{"TMPDIR"} || "/tmp"; - my $pkgdir = "$TMPDIR/tl.$pkgname"; + my $pkgdir = "$TMPDIR/tl.$tlpn"; system ("rm -rf $pkgdir"); mkdir ($pkgdir, 0777) || die "mkdir($pkgdir) failed: $!"; # @@ -1052,6 +1052,7 @@ sub do_tlp { # we don't push bin files. my @tl_basefiles = (); # compare with CTAN after the loop + my @ctan_files = (); my @compared = (); for my $file (@tl_files) { (my $basefile = $file) =~ s,^.*/,,; @@ -1091,7 +1092,7 @@ sub do_tlp { next; } - chomp (my @ctan_files = `find $ctan_dir/ -name $basefile`); + chomp (@ctan_files = `find $ctan_dir/ -name $basefile`); #warn "ctan find $basefile: @ctan_files\n"; # the trailing / is so we dereference a symlink on CTAN. next if @ctan_files > 1; # if more than one file by same name, skip @@ -1154,7 +1155,6 @@ sub do_tlp { print ((@compared + 0) . " compared (@compared)\n") if $OPT{"verbose"}; # clean up the tmpdir possibly created from tlpkginfo --prepare. - chomp (my $ctan_root = `$mydir/tlpkginfo --ctan-root`); if ($ctan_dir !~ m,^$ctan_root, && ! $OPT{"no-clean"}) { system ("rm -rf $ctan_dir"); } diff --git a/Master/tlpkg/bin/tlpkginfo b/Master/tlpkg/bin/tlpkginfo index e79c22e669f..479ca9090c7 100755 --- a/Master/tlpkg/bin/tlpkginfo +++ b/Master/tlpkg/bin/tlpkginfo @@ -71,6 +71,7 @@ sub ctaninfo { -d "$CATALOGUE/k" || die "$0: TEX_CATALOGUE ($CATALOGUE) must point to entries/ subdir" . " of a TeX Catalogue checkout.\n"; + $catalogue_update = 1; # do svn update of catalogue file? # erroneous or problematic tds files (when new, tell CTAN and author) $erroneous_tds = join ("|", @@ -92,6 +93,9 @@ sub ctaninfo { print "$output\n" if $output; return $output ? 0 : 1; + } elsif ($ARGV[0] eq "--no-catalogue") { + $catalogue_update = 0; + } elsif ($ARGV[0] eq "--prepare") { my $output = &prepare ($ARGV[1]); print "$output\n" if $output; # if no $output, errors elsewhere @@ -390,7 +394,7 @@ sub prepare { if ($catfile) { # redirect to stderr because we want the only stdout to be the # directory name for ctan2tl to use. - system ("svn update $catfile >&2"); + system ("timeout 8s svn update $catfile >&2") if $catalogue_update; open (CATFILE, "<$catfile") || die "open($catfile) failed, fixme: $!"; # looking for a line like -- cgit v1.2.3