Skip to content

RDKE-1123: Added recipe version creation - #29

Merged
vbabypublic merged 2 commits into
rdk/kirkstonefrom
feature/RDKE-1123-IPK-mode-enhancement
Aug 3, 2026
Merged

RDKE-1123: Added recipe version creation#29
vbabypublic merged 2 commits into
rdk/kirkstonefrom
feature/RDKE-1123-IPK-mode-enhancement

Conversation

@sreejithravi086

Copy link
Copy Markdown

This is to create version file before invoking the build using bitbake command. This is within the "-s" option to print the recipes and the versions

Copilot AI review requested due to automatic review settings August 3, 2026 11:20
@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/poky/29/rdk/components/opensource/oe/bitbake

  • Commit: 2deff11

Report detail: gist'

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends BitBake’s -s (“show versions”) output to additionally write a recipe_versions.txt file containing recipe/version selections, intended to be produced before running a build.

Changes:

  • Write a recipe_versions.txt file under ${TOPDIR} during Cooker.showVersions().
  • Filter out certain recipe variants from the file output (native/cross/sdk-related) and de-duplicate some lib32- entries.
  • Keep the existing console table output intact.
Suppressed comments (1)

bitbake/lib/bb/cooker.py:558

  • The new file write in showVersions() can raise an unhandled OSError (e.g., read-only TOPDIR) and abort -s entirely. Also, filtering with substring checks like "-sdk" will exclude legitimate target recipes such as core-image-sato-sdk / core-image-rt-sdk (see meta/recipes-*/images/*-sdk.bb). Consider making file output best-effort and use the established native/cross detection patterns (e.g., meta/classes/sstate.bbclass:isNativeCross() / meta/classes/multilib_global.bbclass).
        with open(output_file, "w") as f:
            for p in sorted(self.recipecaches[''].pkg_pn):
                preferred = preferred_versions[p]
                latest = latest_versions[p]
                requiredstr = ""

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread bitbake/lib/bb/cooker.py Outdated
Copilot AI review requested due to automatic review settings August 3, 2026 11:32
@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/poky/29/rdk/components/opensource/oe/bitbake

  • Commit: 28d2f25

Report detail: gist'

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (3)

bitbake/lib/bb/cooker.py:555

  • This change introduces new behavior (writing recipe_versions.txt and filtering entries) but there are no unit tests covering it (no references to recipe_versions exist under bitbake/lib/bb/tests). Adding a test would help prevent regressions and clarify the intended filtering semantics.
        all_recipes = set(self.recipecaches[''].pkg_pn.keys())
        output_file = os.path.join(self.data.getVar('TOPDIR'), "recipe_versions.txt")
        with open(output_file, "w") as f:
            for p in sorted(self.recipecaches[''].pkg_pn):

bitbake/lib/bb/cooker.py:572

  • The filter "-sdk" not in p is over-broad and will exclude legitimate recipe names that merely contain "-sdk" in the middle (not just SDK variant recipes). For example, recipes like packagegroup-go-sdk-target.bb / PN packagegroup-go-sdk-target would be omitted from recipe_versions.txt, causing the file contents to diverge from bitbake -s output.
                if "-native" not in p and "-cross" not in p and "-sdk" not in p and "nativesdk" not in p:

bitbake/lib/bb/cooker.py:555

  • open(output_file, "w") can raise OSError (e.g., TOPDIR not writable) and will currently surface as a Python traceback. Since this is a user-facing -s path, it should fail with a clear BitBake error message.
        output_file = os.path.join(self.data.getVar('TOPDIR'), "recipe_versions.txt")
        with open(output_file, "w") as f:
            for p in sorted(self.recipecaches[''].pkg_pn):

@vbabypublic vbabypublic left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good

@vbabypublic
vbabypublic merged commit ca5c773 into rdk/kirkstone Aug 3, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants