diff options
author | Karl Berry <karl@freefriends.org> | 2012-05-26 18:07:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-05-26 18:07:36 +0000 |
commit | 053051acf0c2867c7f420a12fbf16c0179091462 (patch) | |
tree | 6438a30728cd2bfd7b61dce408060fd2e075f3cf /Master/tlpkg/bin | |
parent | 1a403278034ef69ced347d4a046bc4aaf48008af (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')
-rwxr-xr-x | Master/tlpkg/bin/tl-update-auto | 33 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tl-update-tlpdb | 24 |
2 files changed, 32 insertions, 25 deletions
diff --git a/Master/tlpkg/bin/tl-update-auto b/Master/tlpkg/bin/tl-update-auto index a664da9dcf1..44a2e834750 100755 --- a/Master/tlpkg/bin/tl-update-auto +++ b/Master/tlpkg/bin/tl-update-auto @@ -249,23 +249,22 @@ fi fi # !config_scripts_only -# texcatalogue.data -# -if $config_scripts_only; then :; else -$mydir/tl-dump-texcatalogue /home/httpd/html/catalogue >$temp.tcdata.new -# -tcdatafile=texmf/scripts/texlive/var/texcatalogue.data -# -if test ! -s $temp.tcdata.new; then - $verbose " $temp.tcdata.new empty, skipping." -elif $diff $tcdatafile $temp.tcdata.new >$temp.tcdata.diff; then - $verbose " $tcdatafile ok." -else - $chicken $cp $temp.tcdata.new $tcdatafile - update_list="$update_list $tcdatafile" -fi -fi # !config_scripts_only - +# # texcatalogue.data (commented out since no longer dumping) +# # +# if $config_scripts_only; then :; else +# $mydir/tl-dump-texcatalogue /home/httpd/html/catalogue >$temp.tcdata.new +# # +# tcdatafile=texmf/scripts/texlive/var/texcatalogue.data +# # +# if test ! -s $temp.tcdata.new; then +# $verbose " $temp.tcdata.new empty, skipping." +# elif $diff $tcdatafile $temp.tcdata.new >$temp.tcdata.diff; then +# $verbose " $tcdatafile ok." +# else +# $chicken $cp $temp.tcdata.new $tcdatafile +# update_list="$update_list $tcdatafile" +# fi +# fi # !config_scripts_only # ctan mirror list from ctan. 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"); } |