Closed Bug 1965933 Opened 6 months ago Closed 6 months ago

`packageit.py` does not check for the response code when fetching `msys2` sources and ends up saving a `404 not found` response as a text file looking like an archive

Categories

(Firefox Build System :: MozillaBuild, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ahochheiden, Assigned: ahochheiden)

References

Details

Attachments

(1 file)

With every MozillaBuild release we upload the sources for all the packages we bundle to: https://ftp.mozilla.org/pub/mozilla/libraries/win32/src/

Unfortunately, there was a bug in the implementation, and a ton of those "sources" are just text files of a 404 not found nature disguised with the name of an archive, instead of the actual sources. This was not noticed partially because the implementation was not checking the response code. The other part of the problem is that we are only checking for .src.tar.gz when we should have also been looking for .src.tar.zst (see: https://repo.msys2.org/msys/sources).

Let's check the response code, make the output more verbose in skips/failures/etc, and add the ability to check for multiple file type extensions.

This makes us actually download most of the sources, and prevents us
from saving html 404 not found errors disguised as archives in the
event that there is no source available.

See Also: → 1965939

Pushed by ahochheiden@mozilla.com:
https://hg.mozilla.org/mozilla-build/rev/415f2766afd5
Fix fetching msys2 sources by checking multiple extensions and if the source file exists r=firefox-build-system-reviewers,glandium

Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: