]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
scripts/scriptutils: silence warning about S not existing in emptysrc
authorRoss Burton <ross.burton@arm.com>
Wed, 4 Jun 2025 14:03:23 +0000 (15:03 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 5 Jun 2025 10:01:24 +0000 (11:01 +0100)
This function creates an emptysrc recipe, but S points to a directory
that doesn't exist and bitbake warns about this.

As it is under the temporary working directory which will be deleted
later, create it to silence the warning.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/scriptutils.py

index 81f0b01fa53ea1d9273ce3bfa9cfe3d5f4350fe5..32e749dbb1a277e4cae04fb4104f604509e57777 100644 (file)
@@ -182,7 +182,10 @@ def fetch_url(tinfoil, srcuri, srcrev, destdir, logger, preserve_tmp=False, mirr
                 f.write('UNPACKDIR = "%s"\n' % destdir)
 
                 # Set S out of the way so it doesn't get created under the workdir
-                f.write('S = "%s"\n' % os.path.join(tmpdir, 'emptysrc'))
+                s_dir = os.path.join(tmpdir, 'emptysrc')
+                bb.utils.mkdirhier(s_dir)
+                f.write('S = "%s"\n' % s_dir)
+
                 if not mirrors:
                     # We do not need PREMIRRORS since we are almost certainly
                     # fetching new source rather than something that has already