[php-src] PR #20775: gen_stub: Fix php-parser package download
| From: | thg2k | Date: | Wed, 24 Dec 2025 12:00:58 +0000 |
| Subject: | [php-src] PR #20775: gen_stub: Fix php-parser package download | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-34370@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/20775
Author: thg2k
If the system wgetrc has the
content-disposition = on option, the file is actually
saved as PHP-Parser-5.0.0.tar.gz, causing a subsequent failure.
Even with content-disposition = off, if for any reason the download file already exists
and is corrupted, it won't be overwritten, and a new file such as v5.0.0.tar.gz.1
is saved instead.
We solve both problems by enforcing the name of the downloaded file.
Also, if for any other reason the unpacking should fail, remove the created directory to allow
further attempts.