summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tlpsrc2tlpdb
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-01-10 10:53:59 +0000
committerNorbert Preining <preining@logic.at>2008-01-10 10:53:59 +0000
commit5ab926badb5ad24f8b4b994ad5f18f0d2b3a6953 (patch)
tree09714be5b47fa1659d69008e5fb3e574f5e106d7 /Master/tlpkg/bin/tlpsrc2tlpdb
parentfdf785af06cac0cef5125a27f55f2b12bacb6d9a (diff)
add logging facilities, see extra email
git-svn-id: svn://tug.org/texlive/trunk@6176 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin/tlpsrc2tlpdb')
-rwxr-xr-xMaster/tlpkg/bin/tlpsrc2tlpdb18
1 files changed, 12 insertions, 6 deletions
diff --git a/Master/tlpkg/bin/tlpsrc2tlpdb b/Master/tlpkg/bin/tlpsrc2tlpdb
index f543ec89721..ecfd64dbb06 100755
--- a/Master/tlpkg/bin/tlpsrc2tlpdb
+++ b/Master/tlpkg/bin/tlpsrc2tlpdb
@@ -19,6 +19,7 @@ use TeXLive::TLPSRC;
use TeXLive::TLPOBJ;
use TeXLive::TLPDB;
use TeXLive::TLTREE;
+use TeXLive::TLUtils;
use Getopt::Long;
use Pod::Usage;
use File::Path;
@@ -26,7 +27,7 @@ use File::Path;
my $opt_all = 0;
my $opt_catalogue = "";
chomp (my $opt_master = `cd $::mydir/../.. && pwd`);
-our $opt_debug = 0;
+my $opt_debug = 0;
my $help = 0;
my $opt_nobinsplit = 0;
@@ -39,6 +40,11 @@ GetOptions(
pod2usage(-exitstatus => 0, -verbose => 2) if $help;
+if ($opt_debug) {
+ $::LOGLEVELFILE = $::LOG_DDDEBUG;
+ $::LOGLEVELTERMINAL = $::LOG_DDDEBUG;
+}
+
exit (&main ());
@@ -50,10 +56,10 @@ sub main
my $tlc = undef;
if (! -d $opt_catalogue) {
- warn "$0: -c /Cat/a/logue not given, continuing without it.\n";
+ tllog($::LOG_NORMAL, "$0: -c /Cat/a/logue not given, continuing without it.\n");
} else {
require TeXLive::TeXCatalogue; # not at compile time, for now anyway.
- warn "$0: reading TeX Catalogue tree $opt_catalogue ...\n";
+ tllog($::LOG_NORMAL, "$0: reading TeX Catalogue tree $opt_catalogue ...\n");
$tlc = TeXLive::TeXCatalogue->new( "location" => $opt_catalogue );
}
@@ -64,11 +70,11 @@ sub main
@ARGV = glob ("*.tlpsrc");
}
- warn "$0: reading Master tree $opt_master ...\n";
+ tllog($::LOG_NORMAL, "$0: reading Master tree $opt_master ...\n");
my $tltree = TeXLive::TLTREE->new( "svnroot" => $opt_master );
$tltree->init_from_svn;
- warn "$0: updating from tlpsrc ...\n";
+ tllog($::LOG_NORMAL, "$0: updating from tlpsrc ...\n");
my $tldb = TeXLive::TLPDB->new;
my $last = "";
my $src_count = 0;
@@ -109,7 +115,7 @@ sub main
if ($opt_all) {
$tldb->root("$opt_master");
$tldb->save;
- warn "$0: wrote $src_count packages ", $tldb->root, ".\n";
+ tllog($::LOG_NORMAL, "$0: wrote $src_count packages ", $tldb->root, ".\n");
} else {
$tldb->writeout;
}