Re: [PATCH] contrib: Cleanup downloaded archives in download_prerequisites

Alexander Monakov <[email protected]>
Newsgroups gmane.comp.gcc.patches
Message-ID <[email protected]>
On Fri, 31 Jul 2026, ц╓ц│ц▌ц┴ц┴ц▄ ц╖ц∙ц⌠ц┘ц≈ wrote:

> Given Paolo's comment, I don't think there's a case for changing the
> default. I can rework the patch to keep the current default (archives
> kept) and just expose --save-archives/--no-save-archives as an
> explicit opt-in, for anyone who wants a supported way to clean up
> instead of manually doing `rm -f *.tar.*` in the directory. The
> directory-already-populated check (skip download/verify/extract if
> the target dir has content) would stay as-is either way, since that
> part doesn't touch the archive-deletion question.
> 
> Separately, the partial-extraction issue I mentioned earlier is
> independent of all this - it exists in the script today regardless of
> what happens with archive cleanup - so it's probably worth fixing on
> its own merits either way.
> 
> Let me know if that's worth sending as v2, or if this isn't wanted at
> all.

I wouldn't recommend it. This script is not distributed to users of GCC,
it's there just for developers' convenience, and there's no need to be
concerned with issues that nobody is hitting in practice (for instance,
checking that directory is not empty strikes me as over-engineering
compared to simply checking if it exists).

Keeping the script simple looks more valuable to me.

(on IRC, it was mentioned that it might be worthwhile to make base_url
easier to override, for retrieving files from a local mirror instead of
hitting gcc.gnu.org each time; it would be a one-line change and might
address someone's real need)

Alexander
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.