diff options
Diffstat (limited to 'Master/tlpkg/bin')
-rwxr-xr-x | Master/tlpkg/bin/check-file-coverage | 7 | ||||
-rwxr-xr-x | Master/tlpkg/bin/create-package-list | 10 | ||||
-rwxr-xr-x | Master/tlpkg/bin/generate-fmtutil | 11 | ||||
-rwxr-xr-x | Master/tlpkg/bin/generate-language | 11 | ||||
-rwxr-xr-x | Master/tlpkg/bin/generate-updmap | 11 | ||||
-rwxr-xr-x | Master/tlpkg/bin/mk_download_pkg | 14 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpdb2container | 10 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpdb2list | 7 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpdb2updmap | 7 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpfiles | 8 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlprm | 9 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpsrc2container | 13 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpsrc2tlpdb | 18 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpsrc2tlpobj | 9 | ||||
-rwxr-xr-x | Master/tlpkg/bin/update-containers | 15 |
15 files changed, 117 insertions, 43 deletions
diff --git a/Master/tlpkg/bin/check-file-coverage b/Master/tlpkg/bin/check-file-coverage index 873a5fe2315..8e7329a4a43 100755 --- a/Master/tlpkg/bin/check-file-coverage +++ b/Master/tlpkg/bin/check-file-coverage @@ -37,7 +37,7 @@ my @IgnorePatterns = qw|support/ source/ setuptl/ chomp (my $opt_master = `cd $::mydir/../.. && pwd`); -our $opt_debug = 0; +my $opt_debug = 0; my $help = 0; GetOptions( @@ -46,6 +46,11 @@ GetOptions( pod2usage(-exitstatus => 0, -verbose => 2) if $help; +if ($opt_debug) { + $::LOGLEVELFILE = $::LOG_DDDEBUG; + $::LOGLEVELTERMINAL = $::LOG_DDDEBUG; +} + exit (&main ()); diff --git a/Master/tlpkg/bin/create-package-list b/Master/tlpkg/bin/create-package-list index a57d004e012..85c3716c2a2 100755 --- a/Master/tlpkg/bin/create-package-list +++ b/Master/tlpkg/bin/create-package-list @@ -16,16 +16,22 @@ BEGIN { use strict; use TeXLive::TLPDB; -use TeXLive::TLUtils qw(dirname); +use TeXLive::TLUtils qw(dirname tllog); use Getopt::Long; use Pod::Usage; -our $opt_debug = 0; +my $opt_debug = 0; my $help = 0; GetOptions("debug!", 'help|?' => \$help ) or pod2usage(1); pod2usage(-exitstatus => 0, -verbose => 2) if $help; + +if ($opt_debug) { + $::LOGLEVELFILE = $::LOG_DDDEBUG; + $::LOGLEVELTERMINAL = $::LOG_DDDEBUG; +} + die "$0: missing tlpdb argument; try --help if you need it.\n" if ($#ARGV<0); die "cannot read tlpdb file $ARGV[0]." if (! -r "$ARGV[0]"); diff --git a/Master/tlpkg/bin/generate-fmtutil b/Master/tlpkg/bin/generate-fmtutil index 79f24060e0f..c616ec9e330 100755 --- a/Master/tlpkg/bin/generate-fmtutil +++ b/Master/tlpkg/bin/generate-fmtutil @@ -18,14 +18,14 @@ use strict; use TeXLive::TLConfig; use TeXLive::TLPOBJ; use TeXLive::TLPDB; -use TeXLive::TLUtils qw/kpsewhich/; +use TeXLive::TLUtils qw/kpsewhich tllog/; use Getopt::Long; use Pod::Usage; use File::Path; use Cwd 'abs_path'; our $mydir; -our $opt_debug = 0; +my $opt_debug = 0; my $help = 0; my $dest = ""; my $localconf = ""; @@ -35,6 +35,11 @@ GetOptions("debug!", "dest=s" => \$dest, pod2usage(-exitstatus => 0, -verbose => 2) if $help; +if ($opt_debug) { + $::LOGLEVELFILE = $::LOG_DDDEBUG; + $::LOGLEVELTERMINAL = $::LOG_DDDEBUG; +} + exit (&main ()); sub main @@ -47,7 +52,7 @@ sub main } $dest || ($dest = kpsewhich("TEXMFSYSVAR") . "/web2c/fmtutil.cnf"); $localconf || ($localconf = kpsewhich("TEXMFLOCAL") . "/web2c/fmtutil-local.cnf"); - print "writing fmtutil.cnf data to $dest\n"; + tllog($::LOG_NORMAL, "writing fmtutil.cnf data to $dest\n"); TeXLive::TLUtils::create_fmtutil($tlpdb, $dest, $localconf); } diff --git a/Master/tlpkg/bin/generate-language b/Master/tlpkg/bin/generate-language index 0e3711300fd..dc82106aa69 100755 --- a/Master/tlpkg/bin/generate-language +++ b/Master/tlpkg/bin/generate-language @@ -18,14 +18,14 @@ use strict; use TeXLive::TLConfig; use TeXLive::TLPOBJ; use TeXLive::TLPDB; -use TeXLive::TLUtils qw/kpsewhich/; +use TeXLive::TLUtils qw/kpsewhich tllog/; use Getopt::Long; use Pod::Usage; use File::Path; use Cwd 'abs_path'; our $mydir; -our $opt_debug = 0; +my $opt_debug = 0; my $help = 0; my $dest = ""; my $localconf = ""; @@ -35,6 +35,11 @@ GetOptions("debug!", "dest=s" => \$dest, pod2usage(-exitstatus => 0, -verbose => 2) if $help; +if ($opt_debug) { + $::LOGLEVELFILE = $::LOG_DDDEBUG; + $::LOGLEVELTERMINAL = $::LOG_DDDEBUG; +} + exit (&main ()); sub main @@ -44,7 +49,7 @@ sub main my $tlpdb = TeXLive::TLPDB->new ("root" => "$Master"); $dest || ($dest = kpsewhich("TEXMFSYSVAR") . "/tex/generic/config/language.dat"); $localconf || ($localconf = kpsewhich("TEXMFLOCAL") . "/tex/generic/config/language-local.dat"); - print "writing language.dat data to $dest\n"; + tllog($::LOG_NORMAL, "writing language.dat data to $dest\n"); TeXLive::TLUtils::create_language($tlpdb, $dest, $localconf); } diff --git a/Master/tlpkg/bin/generate-updmap b/Master/tlpkg/bin/generate-updmap index 213b49bf7fc..bd4cca20038 100755 --- a/Master/tlpkg/bin/generate-updmap +++ b/Master/tlpkg/bin/generate-updmap @@ -18,14 +18,14 @@ use strict; use TeXLive::TLConfig; use TeXLive::TLPOBJ; use TeXLive::TLPDB; -use TeXLive::TLUtils qw/kpsewhich/; +use TeXLive::TLUtils qw/kpsewhich tllog/; use Getopt::Long; use Pod::Usage; use File::Path; use Cwd 'abs_path'; our $mydir; -our $opt_debug = 0; +my $opt_debug = 0; my $help = 0; my $dest = ""; my $localconf = ""; @@ -35,6 +35,11 @@ GetOptions("debug!", "dest=s" => \$dest, "local=s" => \$localconf, pod2usage(-exitstatus => 0, -verbose => 2) if $help; +if ($opt_debug) { + $::LOGLEVELFILE = $::LOG_DDDEBUG; + $::LOGLEVELTERMINAL = $::LOG_DDDEBUG; +} + exit (&main ()); sub main @@ -44,7 +49,7 @@ sub main my $tlpdb = TeXLive::TLPDB->new ("root" => "$Master"); $dest || ($dest = kpsewhich("TEXMFSYSVAR") . "/web2c/updmap.cfg"); $localconf || ($localconf = kpsewhich("TEXMFLOCAL") . "/web2c/updmap-local.cfg"); - print "$0: writing new updmap.cfg to $dest\n"; + tllog($::LOG_NORMAL, "$0: writing new updmap.cfg to $dest\n"); TeXLive::TLUtils::create_updmap ($tlpdb, $dest, $localconf); } diff --git a/Master/tlpkg/bin/mk_download_pkg b/Master/tlpkg/bin/mk_download_pkg index 75685e3e8e9..58b748f2237 100755 --- a/Master/tlpkg/bin/mk_download_pkg +++ b/Master/tlpkg/bin/mk_download_pkg @@ -27,7 +27,7 @@ BEGIN { unshift (@INC, "$::installerdir/tlpkg"); } -use TeXLive::TLUtils qw(mkdirhier copy get_system_tmpdir); +use TeXLive::TLUtils qw(mkdirhier copy get_system_tmpdir tllog); use TeXLive::TLPDB; use TeXLive::TLPOBJ; use Getopt::Long; @@ -97,12 +97,12 @@ mkdir "$tmpdir" or die "Can't mkdir \"$tmpdir\".\n"; mkdir "$inst_tmp" or die "Can't mkdir \"$inst_tmp\".\n"; unless ($opt_quiet) { - print "thisdir: \"$thisdir\"\n"; - print "installerdir: \"$installerdir\"\n"; - print "sys_tmp: \"$sys_tmp\"\n"; - print "tmpdir: \"$tmpdir\"\n"; - print "inst_tmp: \"$inst_tmp\"\n"; - print "outputdir: \"$outputdir\"\n"; + tllog ($::LOG_NORMAL, "thisdir: \"$thisdir\"\n"); + tllog ($::LOG_NORMAL, "installerdir: \"$installerdir\"\n"); + tllog ($::LOG_NORMAL, "sys_tmp: \"$sys_tmp\"\n"); + tllog ($::LOG_NORMAL, "tmpdir: \"$tmpdir\"\n"); + tllog ($::LOG_NORMAL, "inst_tmp: \"$inst_tmp\"\n"); + tllog ($::LOG_NORMAL, "outputdir: \"$outputdir\"\n"); } die "outputdir \"$outputdir\" dosn't exist.\n" unless (-d "$outputdir"); diff --git a/Master/tlpkg/bin/tlpdb2container b/Master/tlpkg/bin/tlpdb2container index 33a4744f67f..2f77dd4acc6 100755 --- a/Master/tlpkg/bin/tlpdb2container +++ b/Master/tlpkg/bin/tlpdb2container @@ -18,13 +18,14 @@ use strict; use TeXLive::TLConfig; use TeXLive::TLPOBJ; use TeXLive::TLPDB; +use TeXLive::TLUtils; use Getopt::Long; use Pod::Usage; use File::Path; my $opt_all = 0; our $mydir; -our $opt_debug = 0; +my $opt_debug = 0; my $opt_outputdir = "./archive"; my $opt_relative = 0; my $help = 0; @@ -37,6 +38,11 @@ GetOptions("outputdir=s" => \$opt_outputdir, pod2usage(-exitstatus => 0, -verbose => 2) if $help; +if ($opt_debug) { + $::LOGLEVELFILE = $::LOG_DDDEBUG; + $::LOGLEVELTERMINAL = $::LOG_DDDEBUG; +} + my $srcsplit = 0; my $docsplit = 0; my $type = "lzma"; @@ -62,7 +68,7 @@ sub main if (($format eq "lzma") || ($format eq "zip")) { $type = $format; } else { - warn "unknown container format specified in 00texlive.config: $format\nIgnoring and continuing with $type!\n"; + tllog($::LOG_NORMAL, "unknown container format specified in 00texlive.config: $format\nIgnoring and continuing with $type!\n"); } # get list of packages. my $last = ""; diff --git a/Master/tlpkg/bin/tlpdb2list b/Master/tlpkg/bin/tlpdb2list index f2b74a37a1f..be28b8d2124 100755 --- a/Master/tlpkg/bin/tlpdb2list +++ b/Master/tlpkg/bin/tlpdb2list @@ -21,7 +21,7 @@ use Pod::Usage; use File::Path; my $opt_outputdir = "new-list"; -our $opt_debug = 0; +my $opt_debug = 0; my $help = 0; GetOptions("outputdir=s" => \$opt_outputdir, @@ -30,6 +30,11 @@ GetOptions("outputdir=s" => \$opt_outputdir, pod2usage(-exitstatus => 0, -verbose => 2) if $help; pod2usage(1) if ($#ARGV<0); +if ($opt_debug) { + $::LOGLEVELFILE = $::LOG_DDDEBUG; + $::LOGLEVELTERMINAL = $::LOG_DDDEBUG; +} + if (! -d $opt_outputdir) { mkpath ($opt_outputdir) or die "cannot mkdir $opt_outputdir: $!"; } diff --git a/Master/tlpkg/bin/tlpdb2updmap b/Master/tlpkg/bin/tlpdb2updmap index bfb51a5eedb..bd084eba8cd 100755 --- a/Master/tlpkg/bin/tlpdb2updmap +++ b/Master/tlpkg/bin/tlpdb2updmap @@ -26,13 +26,18 @@ use File::Path; our $NEW_UPDMAP_CFG; our $mydir; -our $opt_debug = 0; +my $opt_debug = 0; my $help = 0; GetOptions("debug!", "help|?" => \$help) or pod2usage(1); pod2usage(-exitstatus => 0, -verbose => 2) if $help; +if ($opt_debug) { + $::LOGLEVELFILE = $::LOG_DDDEBUG; + $::LOGLEVELTERMINAL = $::LOG_DDDEBUG; +} + exit (&main ()); sub main diff --git a/Master/tlpkg/bin/tlpfiles b/Master/tlpkg/bin/tlpfiles index 1409b875569..ca8af22b6c9 100755 --- a/Master/tlpkg/bin/tlpfiles +++ b/Master/tlpkg/bin/tlpfiles @@ -26,13 +26,19 @@ our $FILE; our %DB_BY_FILE; # used privately below. our @opt_pkgof = (); -our $opt_debug = 0; +my $opt_debug = 0; my $help = 0; GetOptions("pkgof=s" => \@opt_pkgof, "debug!", "help|?" => \$help) or pod2usage(1); pod2usage(-exitstatus => 0, -verbose => 2) if $help; + +if ($opt_debug) { + $::LOGLEVELFILE = $::LOG_DDDEBUG; + $::LOGLEVELTERMINAL = $::LOG_DDDEBUG; +} + exit (&main ()); diff --git a/Master/tlpkg/bin/tlprm b/Master/tlpkg/bin/tlprm index 24c16ff624a..4f2bbab72ca 100755 --- a/Master/tlpkg/bin/tlprm +++ b/Master/tlpkg/bin/tlprm @@ -25,7 +25,7 @@ use Pod::Usage; use Getopt::Long; use Cwd 'abs_path'; -our $opt_debug = 0; +my $opt_debug = 0; my $opt_svn = 1; my $help = 0; @@ -34,6 +34,11 @@ GetOptions("svn!", pod2usage(-exitstatus => 0, -verbose => 2) if $help; +if ($opt_debug) { + $::LOGLEVELFILE = $::LOG_DDDEBUG; + $::LOGLEVELTERMINAL = $::LOG_DDDEBUG; +} + exit (&main ()); @@ -48,7 +53,7 @@ sub main foreach my $f (@ARGV) { my $obj = $tlpdb->get_package ($f); if (! $obj) { - warn "$0: no TeX Live package named $f.\n"; + tllog($::LOG_NORMAL, "$0: no TeX Live package named $f.\n"); $failure_count++; next; } diff --git a/Master/tlpkg/bin/tlpsrc2container b/Master/tlpkg/bin/tlpsrc2container index f8bec749499..a65aa9975ef 100755 --- a/Master/tlpkg/bin/tlpsrc2container +++ b/Master/tlpkg/bin/tlpsrc2container @@ -28,7 +28,7 @@ chomp (my $opt_master = `cd $::mydir/../.. && pwd`); my $opt_catalogue = ""; my $opt_type = "zip"; my $opt_outputdir = "./zip"; -our $opt_debug = 0; +my $opt_debug = 0; my $help = 0; GetOptions( @@ -41,6 +41,11 @@ GetOptions( pod2usage(-exitstatus => 0, -verbose => 2) if $help; +if ($opt_debug) { + $::LOGLEVELFILE = $::LOG_DDDEBUG; + $::LOGLEVELTERMINAL = $::LOG_DDDEBUG; +} + exit(&main ()); sub main @@ -60,10 +65,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 ); } @@ -74,7 +79,7 @@ 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; 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; } diff --git a/Master/tlpkg/bin/tlpsrc2tlpobj b/Master/tlpkg/bin/tlpsrc2tlpobj index 26e9380fd2d..df0a823f4da 100755 --- a/Master/tlpkg/bin/tlpsrc2tlpobj +++ b/Master/tlpkg/bin/tlpsrc2tlpobj @@ -24,7 +24,7 @@ use File::Path; my $opt_master = "/src/TeX/texlive-svn/Master"; my $opt_outputdir = "./tlpobj"; -our $opt_debug = 0; +my $opt_debug = 0; my $help = 0; my $opt_catalogue = ""; @@ -36,6 +36,11 @@ GetOptions( pod2usage(-exitstatus => 0, -verbose => 2) if $help; +if ($opt_debug) { + $::LOGLEVELFILE = $::LOG_DDDEBUG; + $::LOGLEVELTERMINAL = $::LOG_DDDEBUG; +} + if (! -d "$opt_master") { die "Master $opt_master does not exists!"; } @@ -46,7 +51,7 @@ if (! -d "$opt_outputdir") { my $tlc; if (! -d "$opt_catalogue") { - warn "$0: -d /Cat/a/logue not given, continuing without it.\n"; + tllog($::LOG_NORMAL, "$0: -d /Cat/a/logue not given, continuing without it.\n"); } else { require TeXLive::TeXCatalogue; # not at compile time, for now anyway. $tlc = TeXLive::TeXCatalogue->new( 'location' => "$opt_catalogue" ); diff --git a/Master/tlpkg/bin/update-containers b/Master/tlpkg/bin/update-containers index 20c66d40a4b..206e1da829d 100755 --- a/Master/tlpkg/bin/update-containers +++ b/Master/tlpkg/bin/update-containers @@ -18,14 +18,14 @@ use strict; use TeXLive::TLConfig; use TeXLive::TLPOBJ; use TeXLive::TLPDB; -use TeXLive::TLUtils qw/debug/; +use TeXLive::TLUtils; use Getopt::Long; use Pod::Usage; use File::Path; my $opt_all = 0; our $mydir; -our $opt_debug = 0; +my $opt_debug = 0; my $opt_containerdir = "./archive"; my $opt_relative = 0; my $help = 0; @@ -36,6 +36,11 @@ GetOptions("containerdir=s" => \$opt_containerdir, pod2usage(-exitstatus => 0, -verbose => 2) if $help; +if ($opt_debug) { + $::LOGLEVELFILE = $::LOG_DDDEBUG; + $::LOGLEVELTERMINAL = $::LOG_DDDEBUG; +} + my $srcsplit = 0; my $docsplit = 0; my $type = "lzma"; @@ -79,17 +84,17 @@ sub main if (defined($archiverevs{$pkg})) { $oldrev = $archiverevs{$pkg}; } else { - debug("found a new package without container: $pkg\n"); + tllog($::LOG_DEBUG, "found a new package without container: $pkg\n"); } my $tlp = $tlpdb->get_package($pkg); my $newrev = 0; if (defined($tlp)) { $newrev = $tlp->revision; } else { - warn "It looks like $pkg has disappeared, you should remove its containers!\n"; + tllog($::LOG_DEBUG, "It looks like $pkg has disappeared, you should remove its containers!\n"); } if ($oldrev == $newrev) { - debug("$pkg up to date\n"); + tllog($::LOG_DEBUG, "$pkg up to date\n"); } elsif ($oldrev < $newrev) { push @todopacks, $pkg; } else { |