Fix getSpecFromDir to handle auto-generated packages without recipe separator#1
Draft
Copilot wants to merge 5 commits intoInheritance/spec_bodyfrom
Draft
Conversation
Co-authored-by: akritkbehera <84931167+akritkbehera@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] def getSpecFromDir in bits_helpers/utilities.py
Is unable to get the header for a auto generated package properly help me get the recipe that gets autogenerated
Fix getSpecFromDir to handle auto-generated packages without recipe separator
Sep 9, 2025
32c70a0 to
10da16c
Compare
akritkbehera
pushed a commit
that referenced
this pull request
Oct 5, 2025
Added support to download pip3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
getSpecFromDirfunction inbits_helpers/utilities.pywas failing when processing auto-generated packages that only return a YAML header without the---recipe separator.Problem
Auto-generated packages created through the
GeneratedPackageclass may only return header content (YAML metadata) without a recipe body. ThegetSpecFromDirfunction assumed all package content follows the format:When auto-generated packages returned only:
The function would fail with:
ValueError: not enough values to unpack (expected 2, got 1)Solution
Modified
getSpecFromDirto handle both cases:This allows auto-generated packages to work properly with the
frominheritance feature while maintaining full backward compatibility.Example
With this fix, auto-generated packages can now be used in inheritance scenarios:
The auto-generated package provides the base specification, and the override spec can modify or extend it as needed.
Testing
Additional Changes
resolve_spec_data💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.