Bug 16501

Summary: RRS: load_recipes() imports BitBake before checking out the right revision
Product: [Yocto Project Subprojects] Recipe Reporting System (RRS) Reporter: Tim Orling <tim.orling>
Component: Recipe Reporting System (RRS)Assignee: Tim Orling <tim.orling>
Status: IN PROGRESS REVIEW --- QA Contact:
Severity: normal    
Priority: Medium    
Version: unspecified   
Target Milestone: 6.2 M2   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Tim Orling 2026-11-14 07:30:20 UTC
rrs_upstream_history.py (and rrs_distros.py) can fail before doing anything, e.g.:

  File ".../lib/bb/cooker.py", line 15, in <module>
    from bb import multiprocessing
  ImportError: cannot import name 'multiprocessing' from 'bb'

load_recipes() in rrs/tools/common.py imports bb.fetch before recipeparse.init_parser() checks out the BitBake revision for the branch, so the bb package comes from whatever revision is checked out at that moment, e.g. an old one left by rrs_upgrade_history.py, which checks out BitBake revisions from the past. The rest of BitBake is then loaded from the checked-out revision, and they don't match.

Fix: import bb.fetch after init_parser() has checked out BitBake.
Comment 1 Tim Orling 2026-11-15 00:46:33 UTC
Patch 2/6 of the series sent to yocto-patches, under review:
https://lore.kernel.org/all/20261115003506.53654-1-tim.orling@konsulko.com/