diff options
| author | Yuta Saito <kateinoigakukun@gmail.com> | 2025-02-12 11:43:05 +0000 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-05-01 16:10:59 +0900 |
| commit | ab1535553b9e4806d95ed217a95188ab971ea8df (patch) | |
| tree | 908aa8c86a4af667dbf05d662197cfccaa65bff0 | |
| parent | 00343f63652e217f4d57af342a696a3337e27d5b (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.
| -rw-r--r-- | tool/downloader.rb | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/tool/downloader.rb b/tool/downloader.rb index 2398fd7b04..82421e4f1d 100644 --- a/tool/downloader.rb +++ b/tool/downloader.rb @@ -215,9 +215,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 |
