summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tl-update-tlpdb
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2012-05-21 04:22:56 +0000
committerNorbert Preining <preining@logic.at>2012-05-21 04:22:56 +0000
commit427fc445850661fff6a8f8471ce765e9a24f9ad5 (patch)
tree1a693e950eb57445db557c4536bafdd599a9ec40 /Master/tlpkg/bin/tl-update-tlpdb
parent949c8ab9cfbc9cb341d543d94bf049eb4466d6c4 (diff)
split out the reading of TeX Catalogue from the update of tlpdb
(to be resistent against TC errors): - new script: tl-dump-texcatalogue that reads from ARGV[0] and dumps to stdout - tl-update-tlpdb: . read catalogue data from Master/texmf/scripts/texlive/var/texcatalogue.data . if this file is not found, reuse the already present catalogue data (instead of dropping all data) - tl-update-auto: update Master/texmf/scripts/texlive/var/texcatalogue.data git-svn-id: svn://tug.org/texlive/trunk@26533 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin/tl-update-tlpdb')
-rwxr-xr-xMaster/tlpkg/bin/tl-update-tlpdb22
1 files changed, 15 insertions, 7 deletions
diff --git a/Master/tlpkg/bin/tl-update-tlpdb b/Master/tlpkg/bin/tl-update-tlpdb
index fe98834223c..1dd4fcf683f 100755
--- a/Master/tlpkg/bin/tl-update-tlpdb
+++ b/Master/tlpkg/bin/tl-update-tlpdb
@@ -20,6 +20,7 @@ use TeXLive::TLPOBJ;
use TeXLive::TLPDB;
use TeXLive::TLTREE;
use TeXLive::TLUtils;
+use TeXLive::TeXCatalogue;
use Getopt::Long;
use Pod::Usage;
use File::Path;
@@ -72,20 +73,27 @@ sub main
die "$progname: Master $opt_master not a directory, goodbye.\n";
}
+ $opt_catalogue = "$opt_master/texmf/scripts/texlive/var/texcatalogue.data"
+ if ! $opt_catalogue;
+
if ($opt_dry_run) {
$opt_no_commit = 1;
$opt_no_revision_check = 1;
$opt_output = "/tmp/tlut" if ! $opt_output;
- $opt_catalogue = "/home/httpd/html/catalogue" if ! $opt_catalogue;
}
- my $tlc = undef;
- if (! -d $opt_catalogue) {
- info ("$progname: -c /Cat/a/logue not given, continuing without it.\n");
+ our $tlc = undef;
+ if (!$opt_keep_catalogue) {
+ if (-r $opt_catalogue) {
+ info ("$progname: reading TeX Catalogue $opt_catalogue ...\n");
+ require($opt_catalogue);
+ #$tlc = TeXLive::TeXCatalogue->new ("location" => $opt_catalogue);
+ } else {
+ tlwarn("$progname: Cannot find $opt_catalogue, reuse old data!\n");
+ $opt_keep_catalogue = 1;
+ }
} else {
- require TeXLive::TeXCatalogue; # not at compile time, for now anyway.
- info ("$progname: reading TeX Catalogue $opt_catalogue ...\n");
- $tlc = TeXLive::TeXCatalogue->new ("location" => $opt_catalogue);
+ info ("$progname: reusing old catalogue data from tlpdb\n");
}
my $oldtlpdb;