From 9d7f0c1688f065455defc9efe8765bc8c8b100a6 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 16 Oct 2023 17:17:01 +0000 Subject: (remove_package): don't worry if a file to be removed doesn't exist, for the case where we're called from tl-update-containers. git-svn-id: svn://tug.org/texlive/trunk@68562 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLPDB.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Master/tlpkg/TeXLive/TLPDB.pm') diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm index 63f8ef44b06..06da78f3b57 100644 --- a/Master/tlpkg/TeXLive/TLPDB.pm +++ b/Master/tlpkg/TeXLive/TLPDB.pm @@ -2128,8 +2128,13 @@ sub remove_package { # now do the removal for my $entry (@goodfiles) { + # sometimes the files might not be there: 1) we remove .tlpobj + # explicitly above; 2) we're called from tl-update-containers + # to update the network tlpdb, and that doesn't have an expanded + # texmf-dist. + next unless -e $entry; + # unlink($entry) - || $entry =~ /\.tlpobj$/ # we remove .tlpobj explicitly above || tlwarn("TLPDB::remove_package: Could not unlink $entry: $!\n"); } for my $d (@removals) { -- cgit v1.2.3