]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
sanity: reject TMPDIR containing redundant slashes
authorSam Povilus <sam.povilus@amd.com>
Wed, 25 Feb 2026 17:13:24 +0000 (17:13 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 2 Mar 2026 18:02:33 +0000 (18:02 +0000)
commit3e72ebe9ed4e2e5f34eb89cd460e75a9242e296f
treed221ecfabf8f92fd2f03e708c9e6c08423e5b14c
parent6f585136467417baf1da88e79c6e33079116e50a
sanity: reject TMPDIR containing redundant slashes

A trailing slash or consecutive slashes anywhere in TMPDIR cause
BitBake variable expansion to embed those redundant slashes into
derived variables such as STAGING_DIR and WORKDIR.  The sstate
machinery in sstate_add() normalises its directory arguments via
os.path.normpath(), so manifest entries always contain clean paths.
Functions in staging.bbclass that read the same variables directly
via d.getVar() without normalising then fail to match manifest
entries, silently staging files to wrong locations and causing
do_populate_sysroot to abort.

Although POSIX permits paths with redundant slashes, they break the
string-matching assumptions embedded in the staging machinery, so
treat any TMPDIR that differs from its normalised form as an error.

Signed-off-by: Sam Povilus <sam.povilus@amd.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-global/sanity.bbclass