Skip to content

RDKB-64491: Prevent Duplicate Dependency components Builds in Native build tools#37

Open
NetajiPanigrahi wants to merge 2 commits into
developfrom
feature/prv_rebuilds
Open

RDKB-64491: Prevent Duplicate Dependency components Builds in Native build tools#37
NetajiPanigrahi wants to merge 2 commits into
developfrom
feature/prv_rebuilds

Conversation

@NetajiPanigrahi
Copy link
Copy Markdown

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

Copilot AI review requested due to automatic review settings May 15, 2026 13:58
@NetajiPanigrahi NetajiPanigrahi requested a review from a team as a code owner May 15, 2026 13:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 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=true option 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 HEAD has already been built.
  • Adds a get_latest_sha helper to compute the current repo HEAD SHA.

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
}
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.

2 participants