]> code.ossystems Code Review - openembedded-core.git/commitdiff
scriptutils: Fix handling of srcuri urls
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 11 Feb 2022 17:28:07 +0000 (17:28 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 12 Feb 2022 17:05:30 +0000 (17:05 +0000)
Bitbake is now requiring there be a call to get_srcrev() when urls contain
floating revisions. This breaks some recipetool workflows since it is running
these queries to determine those revisions. Add a PV entry which triggers
that call to avoid the errors.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/scriptutils.py

index 47a08194d0ddc966216a577ae0c8fc2fdc4b9466..adf81476f0c1a2538d666c9f517d0ea0c70539da 100644 (file)
@@ -179,6 +179,7 @@ def fetch_url(tinfoil, srcuri, srcrev, destdir, logger, preserve_tmp=False, mirr
                 f.write('BB_STRICT_CHECKSUM = "ignore"\n')
                 f.write('SRC_URI = "%s"\n' % srcuri)
                 f.write('SRCREV = "%s"\n' % srcrev)
+                f.write('PV = "0.0+${SRCPV}"\n')
                 f.write('WORKDIR = "%s"\n' % tmpworkdir)
                 # 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'))