summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tlpsrc2tlpdb
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-05-19 08:37:41 +0000
committerNorbert Preining <preining@logic.at>2008-05-19 08:37:41 +0000
commit5177658bbbdaa8778cff3a2ac4fabb765bbcd8fe (patch)
treeb00bfdb0be26f8f7ce3d626ac084b987c608c511 /Master/tlpkg/bin/tlpsrc2tlpdb
parent58c870fa77e1ede0e7b21a7791d0fa5b8fd1542b (diff)
big logging update, new logging facilities: info, debug, ddebug, tlwarn
and a way to automatically process the respective options -q and -v via TeXLive::TLUtils::process_logging_options(); git-svn-id: svn://tug.org/texlive/trunk@8234 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin/tlpsrc2tlpdb')
-rwxr-xr-xMaster/tlpkg/bin/tlpsrc2tlpdb20
1 files changed, 8 insertions, 12 deletions
diff --git a/Master/tlpkg/bin/tlpsrc2tlpdb b/Master/tlpkg/bin/tlpsrc2tlpdb
index 6c8517f8fdd..37ae0be378c 100755
--- a/Master/tlpkg/bin/tlpsrc2tlpdb
+++ b/Master/tlpkg/bin/tlpsrc2tlpdb
@@ -27,24 +27,20 @@ use File::Path;
my $opt_all = 0;
my $opt_catalogue = "";
chomp (my $opt_master = `cd $::mydir/../.. && pwd`);
-my $opt_debug = 0;
my $help = 0;
my $opt_nobinsplit = 0;
+TeXLive::TLUtils::process_logging_options();
+
GetOptions(
"all!" => \$opt_all,
"master=s" => \$opt_master, # location of the TL tree
"catalogue=s" => \$opt_catalogue, # location of the TeX Catalogue
"no-bin-split!" => \$opt_nobinsplit,
- "debug!", "help|?" => \$help) or pod2usage(1);
+ "help|?" => \$help) or pod2usage(1);
pod2usage(-exitstatus => 0, -verbose => 2) if $help;
-if ($opt_debug) {
- $::LOGLEVELFILE = $::LOG_DDDEBUG;
- $::LOGLEVELTERMINAL = $::LOG_DDDEBUG;
-}
-
exit (&main ());
@@ -56,10 +52,10 @@ sub main
my $tlc = undef;
if (! -d $opt_catalogue) {
- tllog($::LOG_NORMAL, "$0: -c /Cat/a/logue not given, continuing without it.\n");
+ info("$0: -c /Cat/a/logue not given, continuing without it.\n");
} else {
require TeXLive::TeXCatalogue; # not at compile time, for now anyway.
- tllog($::LOG_NORMAL, "$0: reading TeX Catalogue $opt_catalogue ...\n");
+ info("$0: reading TeX Catalogue $opt_catalogue ...\n");
$tlc = TeXLive::TeXCatalogue->new( "location" => $opt_catalogue );
}
@@ -70,11 +66,11 @@ sub main
@ARGV = glob ("*.tlpsrc");
}
- tllog($::LOG_NORMAL, "$0: reading Master $opt_master ...\n");
+ info("$0: reading Master $opt_master ...\n");
my $tltree = TeXLive::TLTREE->new( "svnroot" => $opt_master );
$tltree->init_from_svn;
- tllog($::LOG_NORMAL, "$0: updating from tlpsrc ...\n");
+ info("$0: updating from tlpsrc ...\n");
my $tldb = TeXLive::TLPDB->new;
my $last = "";
my $src_count = 0;
@@ -117,7 +113,7 @@ sub main
# do set the option_archs from the dirs in Master/bin
$tldb->option_archs($tltree->architectures);
$tldb->save;
- tllog($::LOG_NORMAL, "$0: wrote $src_count packages to ". $tldb->root . ".\n");
+ info("$0: wrote $src_count packages to ". $tldb->root . ".\n");
} else {
$tldb->writeout;
}