Bug 16293 - sstate download with a filename of 253 characters fails (via https)
Summary: sstate download with a filename of 253 characters fails (via https)
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 5.0.18
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 6.1 M2
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2026-05-21 15:58 UTC by Mark Hatle
Modified: 2026-08-20 12:58 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hatle 2026-05-21 15:58:44 UTC
A 253 character filename is passed to the bitbake wget fetcher.  The bitbake fetcher appends '.tmp' to the name so that the download can me renamed to the final name in a single operation.

This leads to a condition where the filename exceeds the max filename length of the filesystem and wget will refuse to download (or if it tries will fail.)

Either the filename needs to be "further" truncated in sstate.bbclass (it already truncates to under 254 characters), or the bitbake fetcher should detect the long filename and prevent the temp name from exceeding the filesystem length.
Comment 1 Richard Purdie 2026-05-21 15:59:57 UTC
The ".tmp" is a fetcher implementation detail so sstate shouldn't have to worry about this. This should be fixed in the fetcher.
Comment 2 Mark Hatle 2026-05-21 17:29:34 UTC
I think the easiest solution (in the fetcher) is to limit the 'tmp' filename to 250 characters (just truncate it) and then add the '.tmp' suffix.  Then when the file is downloaded, it can be renamed to the original name without an issue.

Alternatively, we could start generating temp filenames, but I'm not sure we really want to change the system behavior in that way at this time.