summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tl-update-tlpdb
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-05-26 18:07:36 +0000
committerKarl Berry <karl@freefriends.org>2012-05-26 18:07:36 +0000
commit053051acf0c2867c7f420a12fbf16c0179091462 (patch)
tree6438a30728cd2bfd7b61dce408060fd2e075f3cf /Master/tlpkg/bin/tl-update-tlpdb
parent1a403278034ef69ced347d4a046bc4aaf48008af (diff)
back to parsing catalogue xml directly, no perl dump
git-svn-id: svn://tug.org/texlive/trunk@26663 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin/tl-update-tlpdb')
-rwxr-xr-xMaster/tlpkg/bin/tl-update-tlpdb24
1 files changed, 16 insertions, 8 deletions
diff --git a/Master/tlpkg/bin/tl-update-tlpdb b/Master/tlpkg/bin/tl-update-tlpdb
index 760da94639d..ac8e26aefa0 100755
--- a/Master/tlpkg/bin/tl-update-tlpdb
+++ b/Master/tlpkg/bin/tl-update-tlpdb
@@ -70,7 +70,10 @@ sub main {
die "$progname: Master $opt_master not a directory, goodbye.\n";
}
- $opt_catalogue = "$opt_master/texmf/scripts/texlive/var/texcatalogue.data"
+
+ $opt_catalogue = "/home/httpd/html/catalogue"
+ # non-working dump method:
+ #$opt_catalogue = "$opt_master/texmf/scripts/texlive/var/texcatalogue.data"
if ! $opt_catalogue;
if ($opt_dry_run) {
@@ -82,12 +85,19 @@ sub main {
our $tlc = undef;
if (-r $opt_catalogue) {
info ("$progname: reading TeX Catalogue $opt_catalogue ...\n");
- require ($opt_catalogue);
+ $tlc = TeXLive::TeXCatalogue->new ("location" => $opt_catalogue);
+ #my $cat_str = TeXLive::TLUtils::read_file_ignore_cr ($opt_catalogue);
+ #no strict "refs"; # else eval fails
+ #eval $cat_str;
+ #warn "$progname: tlceval: $@" if $@;
+ #use strict "refs";
} else {
tlwarn("$progname: reusing Catalogue data, since file not readable: "
. "$opt_catalogue\n");
}
- my ($newtlpdb, $pkgcount) = create_tlpdb($tlc);
+
+ # Create our working tlpdb with Catalogue data.
+ my ($newtlpdb,$pkgcount) = create_tlpdb($tlc);
my $oldtlpdb = undef;
my $OLDTLPDB = "$opt_master/$TeXLive::TLConfig::InfraLocation/texlive.tlpdb";
@@ -301,15 +311,13 @@ sub create_tlpdb {
if (@ARGV) {
# if we have cmd line arguments act as if --tlpsrc-from-cmdline was given.
if (!$opt_tlpsrc_from_cmdline) {
- debug ("$progname: generating tlpdb in /tmp/tlut for @ARGV,\n");
+ debug ("$progname: generating tlpdb in /tmp/tlut for @ARGV.\n");
$opt_tlpsrc_from_cmdline = 1;
}
}
if (!$opt_tlpsrc_from_cmdline) {
- # if not otherwise given use all tlpsrc files
-
- # if regenerating the whole thing, push all tlpsrc files onto @ARGV.
- chdir ($tlpsrc_dir) || die "chdir($tlpsrc_dir) failed: $!";
+ # if not otherwise given, use all tlpsrc files.
+ chdir ($tlpsrc_dir) || die "$progname: chdir($tlpsrc_dir) failed: $!";
@ARGV = glob ("*.tlpsrc");
}