summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuta Saito <[email protected]>2025-02-12 11:43:05 +0000
committerHiroshi SHIBATA <[email protected]>2025-02-13 15:35:31 +0900
commitd35cc0cc772b48c5aaba354e7084278da68f44e4 (patch)
treea93f8d7191f1a3b0079fa10e7cc631cde933bb7d
parent45397f828449498696899b416b7dfcd91ca82455 (diff)
tool/downloader.rb: Stop caching already existing files
Previously, the script was caching any file already present in the destination directory, regardless of its origin. This caused issues when the directory contained files copied from external sources like `autoreconf --install`. For example: 1. `./autogen.sh --install` copies `config.guess` and `config.sub` from the system to `./tool`. 2. `ruby tool/downloader.rb -d tool -e gnu config.guess config.sub` treats those files as if they were downloaded and caches them. 3. Removing the files: `rm tool/config.guess tool/config.sub`. 4. Running the downloader again, it mistakenly restores the cached files instead of downloading fresh versions.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12738
-rw-r--r--tool/downloader.rb3
1 files changed, 0 insertions, 3 deletions
diff --git a/tool/downloader.rb b/tool/downloader.rb
index a057271214..a1520eb6a9 100644
--- a/tool/downloader.rb
+++ b/tool/downloader.rb
@@ -213,9 +213,6 @@ class Downloader
$stdout.puts "#{file} already exists"
$stdout.flush
end
- if cache_save
- save_cache(cache, file, name)
- end
return file.to_path
end
if dryrun