summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tl-update-tlpdb
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-05-26 17:28:46 +0000
committerKarl Berry <karl@freefriends.org>2012-05-26 17:28:46 +0000
commit1a403278034ef69ced347d4a046bc4aaf48008af (patch)
tree8297c04b6b580b912cba999046c4947537c8383a /Master/tlpkg/bin/tl-update-tlpdb
parenta671a93d5fc7c3979cf437e3c742037e676d271d (diff)
--keep-catalogue: remove dev option for simplicity.
(move_catalogue_over): rm commented-out attempt. git-svn-id: svn://tug.org/texlive/trunk@26662 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin/tl-update-tlpdb')
-rwxr-xr-xMaster/tlpkg/bin/tl-update-tlpdb56
1 files changed, 13 insertions, 43 deletions
diff --git a/Master/tlpkg/bin/tl-update-tlpdb b/Master/tlpkg/bin/tl-update-tlpdb
index 5c5f9f67541..760da94639d 100755
--- a/Master/tlpkg/bin/tl-update-tlpdb
+++ b/Master/tlpkg/bin/tl-update-tlpdb
@@ -40,15 +40,13 @@ my $opt_tlpsrc_from_cmdline = 0;
my $opt_w32warning;
my $opt_tlpdb_options_from_tlpsrc = 0;
my $opt_keep_revisions = 0;
-my $opt_keep_catalogue = 0;
TeXLive::TLUtils::process_logging_options();
GetOptions(
"catalogue=s" => \$opt_catalogue,
- "dry-run|n", => \$opt_dry_run,
+ "dry-run|n", => \$opt_dry_run,
"fix-reverse-revisions!" => \$opt_fix_reverse_revisions,
"keep-revisions" => \$opt_keep_revisions,
- "keep-catalogue" => \$opt_keep_catalogue,
"from-files" => \$opt_fromfiles,
"master=s" => \$opt_master,
"no-bin-split!" => \$opt_nobinsplit,
@@ -82,42 +80,31 @@ sub main {
}
our $tlc = undef;
- if (!$opt_keep_catalogue) {
- if (-r $opt_catalogue) {
- info ("$progname: reading TeX Catalogue $opt_catalogue ...\n");
- require($opt_catalogue);
- #$tlc = TeXLive::TeXCatalogue->new ("location" => $opt_catalogue);
- } else {
- tlwarn("$progname: reusing Catalogue data, since file not readable: "
- . "$opt_catalogue\n");
- $opt_keep_catalogue = 1;
- }
+ if (-r $opt_catalogue) {
+ info ("$progname: reading TeX Catalogue $opt_catalogue ...\n");
+ require ($opt_catalogue);
} else {
- info ("$progname: reusing old catalogue data from tlpdb\n");
+ tlwarn("$progname: reusing Catalogue data, since file not readable: "
+ . "$opt_catalogue\n");
}
+ my ($newtlpdb, $pkgcount) = create_tlpdb($tlc);
- my $oldtlpdb;
- if (-r "$opt_master/$TeXLive::TLConfig::InfraLocation/texlive.tlpdb") {
+ my $oldtlpdb = undef;
+ my $OLDTLPDB = "$opt_master/$TeXLive::TLConfig::InfraLocation/texlive.tlpdb";
+ if (-r $OLDTLPDB) {
$oldtlpdb = TeXLive::TLPDB->new ("root" => $opt_master);
}
- my ($newtlpdb, $pkgcount) = create_tlpdb($tlc);
if (!defined($oldtlpdb)) {
- info ("$progname: No checking on increasing revisions, no old tlpdb found\n");
+ tlwarn ("$progname: No revision check, no old tlpdb: $OLDTLPDB\n");
finish ($newtlpdb, $pkgcount);
}
- if (!defined($tlc) && $opt_keep_catalogue) {
- # not working at the moment, the catalogue hash has to be treated
- # specially
- # furthermore, the docfiles specifications are also not moved!!!!
- # better to do this in the create_tlpdb and also add docfile tags?!?
- # move_catalogue_over($oldtlpdb, $newtlpdb);
- }
+
if ($opt_no_revision_check) {
if ($opt_keep_revisions) {
move_revisions_over($oldtlpdb, $newtlpdb);
info ("$progname: Keeping old revisions due to --keep-revisions\n");
} else {
- info ("$progname: Not checking increasing revisions due to --no-reverse-revision-check\n");
+ info ("$progname: Not checking revisions due to --no-reverse-revision-check\n");
}
finish ($newtlpdb, $pkgcount);
}
@@ -187,23 +174,6 @@ sub move_revisions_over {
}
-sub move_catalogue_over {
- # not working at the moment, the catalogue hash needs to be moved
- # one by one!
- my ($oldtlpdb, $newtlpdb) = @_;
- for my $pkg ($newtlpdb->list_packages) {
- my $oldtlp = $oldtlpdb->get_package($pkg);
- if (defined($oldtlp)) {
- my $newtlp = $newtlpdb->get_package($pkg);
- $newtlp->shortdesc($oldtlp->shortdesc);
- $newtlp->longdesc($oldtlp->longdesc);
- $newtlp->catalogue($oldtlp->catalogue);
- $newtlp->cataloguedata($oldtlp->cataloguedata);
- }
- }
-}
-
-
sub compare_and_fix_tlpdbs {
my ($oldtlpdb, $newtlpdb) = @_;