Fix for Accton platform build failure while doing incremental build #10541
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.
Why I did it
PDDF kernel modules symbols are required while building Accton platform modules e.g. AS9716, AS7726, AS7816 etc. When a fresh clone is done and build is triggered, then 'sonic-platform-pddf_1.1_amd64.deb' pkg gets built and symvars file is backed up. This is used in Accton platforms kernel modules build.
However (since the DPKG_CACHE is enabled) if PDDF pkg is picked from the cache then the symvers file is not generated and hence Accton platform kernel modules build would fail.
How I did it
I added a 'derived package' called sonic-platform-pddf-sym which contains the files required for supporting other platform's build. This derived package wont be the part of the final binary, but used only during the build-time. Added dependency for Accton platforms on this new derived package.
How to verify it
After the first build, make some small changes in Accton platform AS7726's kernel module driver file and trigger the Accton pkg re-build. Check if AS7726 kernel modules are built properly.
Which release branch to backport (provide reason below if selected)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)