summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tl-update-tlpdb
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-08-12 22:35:04 +0000
committerNorbert Preining <preining@logic.at>2009-08-12 22:35:04 +0000
commitfc8eb9303d12aeddf2e414971941c29ae88baf04 (patch)
tree791eff3c68d037aef845d9a91fbe0039a93a756f /Master/tlpkg/bin/tl-update-tlpdb
parent4065c83d560e2675c0a32802e984c50a2fc5ca8d (diff)
add several features to tl-update-tlpdb via cmd lines:
. use command line arguments as tlpsrc . disable revision check . output file name remove tlpsrc2tlpdb in favor of tl-update-tlpdb update repository-setup.txt for usage with tl-update-tlpdb git-svn-id: svn://tug.org/texlive/trunk@14630 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin/tl-update-tlpdb')
-rwxr-xr-xMaster/tlpkg/bin/tl-update-tlpdb51
1 files changed, 46 insertions, 5 deletions
diff --git a/Master/tlpkg/bin/tl-update-tlpdb b/Master/tlpkg/bin/tl-update-tlpdb
index 3b74e04f60d..fd69fdc942e 100755
--- a/Master/tlpkg/bin/tl-update-tlpdb
+++ b/Master/tlpkg/bin/tl-update-tlpdb
@@ -31,6 +31,9 @@ my $opt_nobinsplit = 0;
my $opt_winwarning;
my $opt_fromfiles = 0;
my $opt_noautopatterns = 0;
+my $opt_norevisioncheck = 0;
+my $opt_tlpsrc_from_cmdline = 0;
+my $opt_output;
TeXLive::TLUtils::process_logging_options();
GetOptions(
@@ -38,8 +41,11 @@ GetOptions(
"catalogue=s" => \$opt_catalogue, # location of the TeX Catalogue
"no-bin-split!" => \$opt_nobinsplit,
"no-autopatterns" => \$opt_noautopatterns,
+ "no-revision-check" => \$opt_norevisioncheck,
"from-files" => \$opt_fromfiles,
+ "tlpsrc-from-cmdline" => \$opt_tlpsrc_from_cmdline,
"with-win-pattern-warning" => \$opt_winwarning,
+ "output=s" => \$opt_output,
"help|?" => \$help) or pod2usage(1);
pod2usage(-exitstatus => 0, -verbose => 2) if $help;
@@ -53,8 +59,18 @@ exit (&main ());
sub finish
{
my ($tlpdb, $pkgcount) = @_;
- $tlpdb->save;
- info ("$0: wrote $pkgcount packages to ". $tlpdb->root . ".\n");
+ if ($opt_output) {
+ if (open(OUT, ">$opt_output")) {
+ $tlpdb->writeout(\*OUT);
+ info ("$0: wrote $pkgcount packages to $opt_output.\n");
+ } else {
+ warn ("Cannot open $opt_output for writing");
+ exit 1;
+ }
+ } else {
+ $tlpdb->save;
+ info ("$0: wrote $pkgcount packages to ". $tlpdb->root . ".\n");
+ }
exit(0);
}
@@ -78,6 +94,10 @@ sub main
info("No checking on increasing revisions, no old tlpdb found\n");
finish($newtlpdb, $pkgcount);
}
+ if ($opt_norevisioncheck) {
+ info("No checking on increasing revisions due to --no-revision-check\n");
+ finish($newtlpdb, $pkgcount);
+ }
if (compare_tlpdbs($oldtlpdb, $newtlpdb)) {
# compare_tlpdbs checks in dummy changes to the tlpsrc files
# now we check again and that should not give any changes!
@@ -123,9 +143,14 @@ sub create_tlpdb
$::tlpsrc_pattern_warn_win = 1;
}
my $tlpsrc_dir = "$opt_master/tlpkg/tlpsrc";
- # if we're regenerating the whole thing, get all our tlpsrc files.
- chdir ($tlpsrc_dir) || die "chdir($tlpsrc_dir) failed: $!";
- @ARGV = glob ("*.tlpsrc");
+
+ if (!$opt_tlpsrc_from_cmdline) {
+ # if not otherwise given use all tlpsrc files
+
+ # if we're regenerating the whole thing, get all our tlpsrc files.
+ chdir ($tlpsrc_dir) || die "chdir($tlpsrc_dir) failed: $!";
+ @ARGV = glob ("*.tlpsrc");
+ }
info ("$0: reading Master $opt_master ...\n");
my $tltree = TeXLive::TLTREE->new ("svnroot" => $opt_master);
@@ -227,6 +252,17 @@ Do NOT split files with binaries into several packages (one for the arch
independent and one for each of the architectures with only the respective
binaries). There is no reason to use this option.
+=item B<-tlpsrc-from-cmdline>
+
+by default, B<tl-update-tlpdb> recreates the tlpdb from all the tlpsrc
+files present in the current tree. If this option is given the tlpsrc
+have to be given on the command line.
+
+=item B<-output=filename>
+
+by default, B<tl-update-tlpdb> saves/updates the tlpdb in the default
+place. This option specifies the place where the output should go to.
+
=item B<-with-win-pattern-warning>
Normally, this program issues a warning for all patterns without a matching
file, but does I<not> warn for binpatterns when working on the win32
@@ -236,6 +272,11 @@ those where a binpattern on win32 does not hit.
=item B<-from-files>
Use find instead of svn -status to create the list of files.
+=item B<-no-revision-check>
+By default, B<tl-update-tlpdb> checks that in the generated tlpdb the
+revision numbers of packages are not going backward compared to the
+previous version. This option disables this check.
+
=back
The standard options B<-q>, B<-v>, and B<-logfile>=I<file> are also