Bug 16513

Summary: RRS: python3-* recipes are almost never matched to a distro package
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-15 02:46:50 UTC
search_package_in_distros() in rrs/tools/rrs_distros.py looks for a
recipe's PN in each distro's package list. OE names Python modules
python3-<name>, but distros name their source packages differently:
Fedora and openSUSE use python-<name>, and Debian and Ubuntu use the
upstream project's name (with python3-<name> as the binary package). On
a test instance, 1 of meta-python's 712 python3-* recipes matched any
distro.

Proposed fix: for python3-<name> recipes, also look for python-<name>.
Together with the OE-Core change to record Debian/Ubuntu binary package
names (bug 16512), this matches about 414 recipes in Fedora, 322 in
openSUSE and more in Debian. The bare <name> isn't tried: it gives
false matches such as python3-icu -> icu and python3-lz4 -> lz4.

Also, the loop that should strip nativesdk-/-native/-cross/-initial from
the PN discards the result of str.replace(), so it has never done
anything.
Comment 1 Tim Orling 2026-11-15 03:15:53 UTC
Tested on the layer index test instance (layers.moto-timo.net): RRS's
rrs_distros.py against OE-Core master (f32bced7b4) with the 16503 and
16509-16511 patches, the patch for 16512 (Debian/Ubuntu binary package
names) and the layer index change for 16513 (python3-<name> also matches
python-<name>):

  NOTE: Distro: Debian, Latest Release: 13.7, # packages: 91775
  NOTE: Distro: Ubuntu, Latest Release: resolute, # packages: 16528
  NOTE: Distro: Fedora, Latest Release: 45, # packages: 23237
  NOTE: Distro: openSUSE, Latest Release: 16.1, # packages: 10638

No warnings. Recipes on master matched to at least one distro:
meta-python 574 of 727 (7 before), openembedded-core 664 of 960,
meta-oe 767 of 1094. Recipe-to-distro matches went from 4177 to 6045.

Examples: python3-requests matches python3-requests in Debian and Ubuntu
and python-requests in Fedora and openSUSE; python3-lz4 matches
python-lz4, not the lz4 C library; python3-icu matches Debian's
python3-icu binary package; qemu-system-native matches Debian's
qemu-system.
Comment 2 Tim Orling 2026-11-15 03:26:39 UTC
Patches sent to yocto-patches, under review (patchwork 104083, 104084):
https://lore.kernel.org/all/20261115031803.74076-2-tim.orling@konsulko.com/

Debian/Ubuntu matching also needs the OE-Core change for bug 16512.