summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-08-29 05:33:49 +0000
committerNorbert Preining <preining@logic.at>2009-08-29 05:33:49 +0000
commit2f24d5633c43cf2e65041c534e714172cf922694 (patch)
treec70538e76d7ad694575b903d65399eca559d273b /Master
parent2ab96068365b24d5d1f959273f051c6a0e5761cd (diff)
do removed file check only if !--list
git-svn-id: svn://tug.org/texlive/trunk@14934 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl103
1 files changed, 52 insertions, 51 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 21c71b66422..ea8fc60de63 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -2143,7 +2143,6 @@ sub action_update {
info("done\n") unless $::machinereadable;
}
-
print "end-of-updates\n" if $::machinereadable;
#
@@ -2151,63 +2150,65 @@ sub action_update {
# them have been successfully updated
my $infra_update_done = 1;
my @infra_files_to_be_removed;
- for my $pkg (@critical) {
- next unless (defined($updated{$pkg}));
- $infra_update_done &&= $updated{$pkg};
- my $oldtlp;
- my $newtlp;
- if ($updated{$pkg}) {
- $oldtlp = $localtlpdb->get_package($pkg);
- $newtlp = $tlmediatlpdb->get_package($pkg);
- } else {
- # update failed but we could introduce new files, that
- # should be removed now as a part of restoring backup
- $oldtlp = $tlmediatlpdb->get_package($pkg);
- $newtlp = $localtlpdb->get_package($pkg);
- }
- die ("That shouldn't happen: $pkg not found in tlpdb") if !defined($newtlp);
- die ("That shouldn't happen: $pkg not found in tlpdb") if !defined($oldtlp);
- my @old_infra_files = $oldtlp->all_files;
- my @new_infra_files = $newtlp->all_files;
- my %del_files;
- @del_files{@old_infra_files} = ();
- delete @del_files{@new_infra_files};
- for my $k (keys %del_files) {
- my @found_pkgs = $localtlpdb->find_file($k);
- if ($#found_pkgs >= 0) {
- my $bad_file = 1;
- if (win32()) {
- # on win32 the packages have not been removed already,
- # so we check that the only package listed in @found_pkgs
- # is the one we are working on ($pkg)
- if ($#found_pkgs == 0 && $found_pkgs[0] =~ m/^$pkg:/) {
- # only one package has been returned and it
- # matches the current package followed by a colon
- # remember the TLPDB->find_file returns
- # $pkg:$file
- # in this case we can ignore it
- $bad_file = 0;
+ if (!$opts{"list"}) {
+ for my $pkg (@critical) {
+ next unless (defined($updated{$pkg}));
+ $infra_update_done &&= $updated{$pkg};
+ my $oldtlp;
+ my $newtlp;
+ if ($updated{$pkg}) {
+ $oldtlp = $localtlpdb->get_package($pkg);
+ $newtlp = $tlmediatlpdb->get_package($pkg);
+ } else {
+ # update failed but we could introduce new files, that
+ # should be removed now as a part of restoring backup
+ $oldtlp = $tlmediatlpdb->get_package($pkg);
+ $newtlp = $localtlpdb->get_package($pkg);
+ }
+ die ("That shouldn't happen: $pkg not found in tlpdb") if !defined($newtlp);
+ die ("That shouldn't happen: $pkg not found in tlpdb") if !defined($oldtlp);
+ my @old_infra_files = $oldtlp->all_files;
+ my @new_infra_files = $newtlp->all_files;
+ my %del_files;
+ @del_files{@old_infra_files} = ();
+ delete @del_files{@new_infra_files};
+ for my $k (keys %del_files) {
+ my @found_pkgs = $localtlpdb->find_file($k);
+ if ($#found_pkgs >= 0) {
+ my $bad_file = 1;
+ if (win32()) {
+ # on win32 the packages have not been removed already,
+ # so we check that the only package listed in @found_pkgs
+ # is the one we are working on ($pkg)
+ if ($#found_pkgs == 0 && $found_pkgs[0] =~ m/^$pkg:/) {
+ # only one package has been returned and it
+ # matches the current package followed by a colon
+ # remember the TLPDB->find_file returns
+ # $pkg:$file
+ # in this case we can ignore it
+ $bad_file = 0;
+ }
+ }
+ if ($bad_file) {
+ tlwarn("The file $k has disappeared from the critical" .
+ "package $pkg but is still present in @found_pkgs\n");
+ } else {
+ push @infra_files_to_be_removed, $k;
}
- }
- if ($bad_file) {
- tlwarn("The file $k has disappeared from the critical" .
- "package $pkg but is still present in @found_pkgs\n");
} else {
push @infra_files_to_be_removed, $k;
}
- } else {
- push @infra_files_to_be_removed, $k;
}
}
- }
- if (!win32()) {
- for my $f (@infra_files_to_be_removed) {
- # TODO actually unlink the stuff
- #unlink("$Master/$f");
- debug("removing disappearing file $f\n");
- }
- }
+ if (!win32()) {
+ for my $f (@infra_files_to_be_removed) {
+ # TODO actually unlink the stuff
+ #unlink("$Master/$f");
+ debug("removing disappearing file $f\n");
+ }
+ }
+ } # end of if (!$opts{"list"})
# check if any additional updates are asked for
my $other_updates_asked_for = 0;