Commit 548443b
authored
[build] Fix sonic-utilities-data submodule dep (#22917)
Why I did it
The sonic-utilities-data_1.0-1_all.deb target depends on sources from the src/sonic-utilities submodule. However, the cache dependency file does not list this submodule as a dependency. So, when the build cache is used, updates to the src/sonic-utilities submodule pointer do not trigger the necessary rebuild of sonic-utilities-data_1.0-1_all.deb, leading to a stale build output.
How I did it
Updated rules/sonic-utilities-data.dep to include the proper SMDEP rules.
How to verify it
Perform a build with the dpkg cache enabled
Confirm the new output file target/debs/bookworm/sonic-utilities-data_1.0-1_all.deb.smdep is created, containing the submodule dependencies (smdeps)
Archive the target/debs/bookworm/sonic-utilities-data_1.0-1_all.deb output outside the build workspace
Clean the build workspace
Update the src/sonic-utilities submodule pointer to a new commit that contains different source code
Perform another build with the dpkg cache enabled
Extract the previous and current sonic-utilities-data_1.0-1_all.deb outputs. Confirm that the contents of the debian packages are distinct and contain the expected source based on the respective src/sonic-utilities submodule pointers
This is a build bug which silently results in incorrect build outputs when the dpkg cache is used. As such, it should be double committed.
Tested branch (Please provide the tested image version)
202405 (6fad19a)
Description for the changelog
Fix submodule build dependency for sonic-utilities-data1 parent 4ac68cf commit 548443b
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
0 commit comments