diff mbox series

scripts/scriptutils: tweak fetch_url to support bb.fetch/bb.fetch2

Message ID 20260830141518.8187-1-chris.laplante@agilent.com
State New
Headers show
Series scripts/scriptutils: tweak fetch_url to support bb.fetch/bb.fetch2 | expand

Commit Message

chris.laplante@agilent.com Aug. 30, 2026, 2:15 p.m. UTC
From: Chris Laplante <chris.laplante@agilent.com>

BitBake is renaming bb.fetch2 => bb.fetch.

Pass both bb.fetch.MissingChecksumEvent and bb.fetch2.MissingChecksumEvent
to extra_events so things work in the interim.

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
---
 scripts/lib/scriptutils.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/scripts/lib/scriptutils.py b/scripts/lib/scriptutils.py
index 33e197a22c..654ca90227 100644
--- a/scripts/lib/scriptutils.py
+++ b/scripts/lib/scriptutils.py
@@ -211,7 +211,9 @@  def fetch_url(tinfoil, srcuri, srcrev, destdir, logger, preserve_tmp=False, mirr
             res = tinfoil.build_targets(fetchrecipepn,
                                         'do_unpack',
                                         handle_events=True,
-                                        extra_events=['bb.fetch2.MissingChecksumEvent'],
+                                        # Support BitBake before and after the bb.fetch2 rename.
+                                        extra_events=['bb.fetch2.MissingChecksumEvent',
+                                                      'bb.fetch.MissingChecksumEvent'],
                                         event_callback=eventhandler)
             if not res:
                 raise FetchUrlFailure(srcuri)