RDKB-64491: Prevent Duplicate Dependency components Builds in Native build tools#37
Open
NetajiPanigrahi wants to merge 2 commits into
Open
RDKB-64491: Prevent Duplicate Dependency components Builds in Native build tools#37NetajiPanigrahi wants to merge 2 commits into
NetajiPanigrahi wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a lightweight build-skip mechanism to the dependency setup flow to avoid rebuilding dependency components when the source revision hasn’t changed, improving native build efficiency.
Changes:
- Adds a
RE_BUILD=trueoption to remove prior “build completed” marker files without deleting the whole build/install directories. - Introduces SHA-based “build completed” marker files to skip rebuilding a repo when the current
HEADhas already been built. - Adds a
get_latest_shahelper to compute the current repoHEADSHA.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
cov_docker_script/setup_dependencies.sh |
Adds rebuild flag handling and SHA-based build skipping via build_*.done markers. |
cov_docker_script/common_build_utils.sh |
Adds get_latest_sha() helper used for the build-skip marker logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+110
to
+116
| local LATEST_SHA="$(get_latest_sha "$repo_dir")" | ||
| if [ -f "$repo_dir/build_${LATEST_SHA}.done" ]; then | ||
| # Copy libraries | ||
| copy_libraries "$repo_dir" "$USR_DIR/local/lib" | ||
| copy_libraries "$repo_dir" "$USR_DIR/lib" | ||
| log "Build alredy done for SHA: $LATEST_SHA, skipping." | ||
| return 0 |
| # Copy libraries | ||
| copy_libraries "$repo_dir" "$USR_DIR/local/lib" | ||
| copy_libraries "$repo_dir" "$USR_DIR/lib" | ||
| log "Build alredy done for SHA: $LATEST_SHA, skipping." |
Comment on lines
191
to
+192
| ok "$name build completed" | ||
| touch "$repo_dir/build_${LATEST_SHA}.done" |
Comment on lines
+47
to
+51
| git -C "$repo_path" rev-parse -is-inside-work-tree >/dev/null 2>&1 \ | ||
| || { echo "Invalid git repo"; return 1; } | ||
|
|
||
| git -C "$repo_path" rev-parse --short HEAD | ||
| } |
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.
Reason for change: Preventing unnecessary rebuilds to improve build efficiency.
Test Procedure: Components native should pass
Risks: Low
Priority: P1
Signed-off-by: Netaji Panigrahi Netaji_Panigrahi@comcast.com