diff options
author | Norbert Preining <preining@logic.at> | 2010-03-12 17:53:24 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2010-03-12 17:53:24 +0000 |
commit | edb543fd68f53404a38825694f9d54535feb7b50 (patch) | |
tree | 258d1655fc06e08ce19d782f526a569212a9f7a1 /Master/tlpkg/TeXLive | |
parent | 354c0864a5566b532eba4b6c12244e22d2f9078f (diff) |
tlmgr: do not warn if during an upgrade a file is moved from one to another
package
git-svn-id: svn://tug.org/texlive/trunk@17443 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r-- | Master/tlpkg/TeXLive/TLMedia.pm | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/Master/tlpkg/TeXLive/TLMedia.pm b/Master/tlpkg/TeXLive/TLMedia.pm index 31d128fe50c..99eb234d896 100644 --- a/Master/tlpkg/TeXLive/TLMedia.pm +++ b/Master/tlpkg/TeXLive/TLMedia.pm @@ -398,7 +398,7 @@ sub _install_package { # remove_package removes a single package with all files (including the # # tlpobj files) and the entry from the tlpdb. sub remove_package { - my ($self, $pkg, $nopostinstall) = @_; + my ($self, $pkg, %opts) = @_; my $localtlpdb = $self->tlpdb; my $tlp = $localtlpdb->get_package($pkg); if (!defined($tlp)) { @@ -445,15 +445,36 @@ sub remove_package { } my @goodfiles = (); my @badfiles = (); + my @debugfiles = (); for my $f (@files) { # in usermode we have to add texmf-dist again for comparison if (defined($allfiles{$f})) { # this file should be removed but is mentioned somewhere, too - push @badfiles, $f; + # take into account if we got a warn list + if (defined($opts{'remove-warn-files'})) { + my %a = %{$opts{'remove-warn-files'}}; + if (defined($a{$f})) { + push @badfiles, $f; + } else { + # NO NOTHING HERE!!! + # DON'T PUSH IT ON @goodfiles, it will be removed, which we do + # NOT want. We only want to supress the warning! + push @debugfiles, $f; + } + } else { + push @badfiles, $f; + } } else { push @goodfiles, $f; } } + if ($#debugfiles >= 0) { + debug("The following files will not be removed due to the removal of $pkg.\n"); + debug("But we do not warn on it because they are moved to other packages.\n"); + for my $f (@debugfiles) { + debug(" $f - $allfiles{$f}\n"); + } + } if ($#badfiles >= 0) { # warn the user tlwarn("The following files should be removed due to the removal of $pkg,\n"); @@ -465,7 +486,7 @@ sub remove_package { # # Run only the postaction code thing now since afterwards the # files will be gone ... - if (!$nopostinstall) { + if (defined($opts{'nopostinstall'}) && $opts{'nopostinstall'}) { &TeXLive::TLUtils::do_postaction("remove", $tlp, 0, # option_file_assocs, 0, # option_desktop_integration, |