diff options
author | Norbert Preining <preining@logic.at> | 2012-02-20 23:14:11 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2012-02-20 23:14:11 +0000 |
commit | c9dbdcc25fbcc54f6a8bfb74e150215bbcffd5a5 (patch) | |
tree | 62dd7057513d2d26df738595080c4c4abd8c312a /Master/tlpkg/bin | |
parent | 744840d77c63f8399e836aaf65f841629ab59b0e (diff) |
try to implement a --keep-catalogue option, but does not work for now
git-svn-id: svn://tug.org/texlive/trunk@25441 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin')
-rwxr-xr-x | Master/tlpkg/bin/tl-update-tlpdb | 27 |
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) = @_; |