Fix quilt patch paths for nested package sources #29148
All Vouch review confidence checks passed
Residual risk 0.28 = Change Risk (0.50) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 398 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.358
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #29148"
general
weight: 0.35
dlanov
Description of PR
Summary:
Fixes #29140.
slave.mkassumes quilt patches always live at<SRC_PATH>.patch. This does not work when a package'sSRC_PATHpoints to a subdirectory inside a git submodule, because the corresponding patch directory would also need to live inside that submodule and therefore cannot be tracked bysonic-buildimage.Add an optional per-package
_PATCH_PATHoverride while preserving<SRC_PATH>.patchas the default for backward compatibility.Use the override for nested package sources under
sonic-platform-daemonsandsonic-genl-packet, with a separate patch directory for each source package.Type of change
Back port request
Tested branch
Test result
Validated the patch-path handling with GNU Make and quilt without requiring a full SONiC image build:
<SRC_PATH>.patchlayout: quilt push/pop succeeded and restored the original source._PATCH_PATHlayout: quilt push/pop succeeded and restored the original source..ONESHELLandpushdoccurring before the patch existence check..pccleanup after quilt pop.git diff --checkpasses.Approach
What is the motivation for this PR?
Packages such as
sonic-xcvrduse a source path inside thesonic-platform-daemonssubmodule:src/sonic-platform-daemons/sonic-xcvrdThe existing quilt convention therefore looks for:
src/sonic-platform-daemons/sonic-xcvrd.patchwhich is inside the submodule working tree and cannot be maintained by the parent
sonic-buildimagerepository.How did you do it?
Add
resolve_patch_pathandresolve_patch_abspathhelpers.If
<package>_PATCH_PATHis defined, quilt uses that directory. Otherwise the existing<SRC_PATH>.patchbehavior is preserved.For example,
sonic-xcvrdpatches can now be tracked under:src/sonic-platform-daemons.patch/sonic-xcvrdOther nested packages use the same package-specific layout under
sonic-platform-daemons.patchorsonic-genl-packet.patch.All patch existence checks use an absolute resolved path so behavior is independent of the recipe's current working directory.
How did you verify/test it?
Tested both the existing patch-directory convention and the new nested-source override using real quilt push/pop operations.
Also specifically tested the Python wheel recipe execution pattern, where the build changes directory to
SRC_PATHbefore checking and applying patches.Any platform specific information?
No. The build-system change is generic.
Supported testbed topology if it's a new test case?
N/A
Documentation
No user-facing documentation change required. The new
_PATCH_PATHmechanism is documented inline in the build helper and recipe.