RDKEMW-23121: Use vendor functions if available - #597
Open
rwarier wants to merge 5 commits into
Open
Conversation
Modified to use device specific overrides. Xi6 devices fetch getEstbMacAddress differently
Contributor
There was a problem hiding this comment.
Pull request overview
Updates lib/rdk/utils.sh to optionally load vendor/device-specific override functions (e.g., Xi6-specific getEstbMacAddress behavior) when available.
Changes:
- Added conditional sourcing of a vendor override script (
utils-vendor.sh) at the end ofutils.sh.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (1)
lib/rdk/utils.sh:290
RDK_PATHis unquoted (and not checked for emptiness) in the-ftest and when sourcing. IfRDK_PATHis empty or contains whitespace/globs, the test can behave unexpectedly and you could end up sourcing the wrong file (e.g.,/utils-vendor.sh). Quote the path and guard onRDK_PATHbeing set.
if [ -f $RDK_PATH/utils-vendor.sh ]; then
. $RDK_PATH/utils-vendor.sh
fi
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (1)
lib/rdk/utils.sh:290
- Unquoted
$RDK_PATHcan be word-split/glob-expanded in the-ftest and when sourcing the file, which can cause the vendor overrides to be skipped or (in worst cases) source an unintended path. Quote the path and guard against an empty/unsetRDK_PATH.
if [ -f $RDK_PATH/utils-vendor.sh ]; then
. $RDK_PATH/utils-vendor.sh
fi
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (1)
lib/rdk/utils.sh:290
- The vendor override sourcing relies on $RDK_PATH but does not handle it being unset/empty. In that case, this expands to /utils-vendor.sh (and can miss the intended /lib/rdk/utils-vendor.sh when scripts source utils.sh via an absolute path). Also quote the path to avoid word-splitting/globbing issues.
if [ -f $RDK_PATH/utils-vendor.sh ]; then
. $RDK_PATH/utils-vendor.sh
fi
Comment on lines
45
to
47
| . /etc/include.properties | ||
| . /etc/device.properties | ||
| . $RDK_PATH/utils.sh |
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.
Modified to use device specific overrides. Xi6 devices fetch getEstbMacAddress differently