summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/bin')
-rwxr-xr-xMaster/tlpkg/bin/tl-update-tlpdb27
1 files changed, 27 insertions, 0 deletions
diff --git a/Master/tlpkg/bin/tl-update-tlpdb b/Master/tlpkg/bin/tl-update-tlpdb
index d3467a3973a..fe98834223c 100755
--- a/Master/tlpkg/bin/tl-update-tlpdb
+++ b/Master/tlpkg/bin/tl-update-tlpdb
@@ -39,6 +39,7 @@ 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 = 1;
TeXLive::TLUtils::process_logging_options();
GetOptions(
@@ -46,6 +47,7 @@ GetOptions(
"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,
@@ -95,6 +97,13 @@ sub main
info ("$progname: No checking on increasing revisions, no old tlpdb found\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);
@@ -171,6 +180,24 @@ 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) = @_;