-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[makefile] define a do-nothing target for config.user #7483
Conversation
It seems missing by design 7e2fa7d. What issue are you facing? |
-include is supposed to be fine when file is missing. checking more. |
bb8441a
to
88142ab
Compare
-include rules/config.user is supposed to be fine when the file is missing. However, it triggers an interesting issue that when the file is missing, make init and make reset will also try to build the sonic slave dockers. Use the less exciting way to include it only when it exists works around the unexpected docker build issue. Signed-off-by: Ying Xie <[email protected]>
@qiluo-msft you are right the design was that the file can be missing. @bluecmd can you take a look at this change. This is less exciting then your original change but work-around the issue that sonic slave docker got built with "make init" and "make reset". If you have better way of preventing it, please let me know or propose with another PR. |
Hi! While I can't say I noticed this behavior when I made the change, I found this passage in the Make docs that might be the reason why the include seems to cause other things to build:
Reading that, it seems that this could possibly also be fixed by explicitly defining rules/config.user:
include rules/config
-include rules/config.user Personally, I think the wildcard approach here is pretty smart and nice looking - but I also know we have What do you say about giving this other way a try and see if it works and then we can see which approach seems the right way forward? |
@bluecmd Thanks for digging up the information. The do-nothing target works with a slight tweak. The target needs at least 1 dummy operations to catch the rebuild. But it works! Thanks! |
Why I did it After PR #7344, 'make init' and/or 'make reset' will also build sonic slave dockers. '-include rules/config.user' is supposed to be fine when the file is missing. However, when the file is missing, it generates a delayed error which later causes make init and make reset trying to build the sonic slave dockers. How I did it Define a do-nothing target for config.user to catch config.user build therefore preventing other builds to be triggered unexpectedly. How to verify it did make init and it is now only doing submodule init.
Why I did it After PR sonic-net#7344, 'make init' and/or 'make reset' will also build sonic slave dockers. '-include rules/config.user' is supposed to be fine when the file is missing. However, when the file is missing, it generates a delayed error which later causes make init and make reset trying to build the sonic slave dockers. How I did it Define a do-nothing target for config.user to catch config.user build therefore preventing other builds to be triggered unexpectedly. How to verify it did make init and it is now only doing submodule init.
Why I did it After PR sonic-net#7344, 'make init' and/or 'make reset' will also build sonic slave dockers. '-include rules/config.user' is supposed to be fine when the file is missing. However, when the file is missing, it generates a delayed error which later causes make init and make reset trying to build the sonic slave dockers. How I did it Define a do-nothing target for config.user to catch config.user build therefore preventing other builds to be triggered unexpectedly. How to verify it did make init and it is now only doing submodule init.
Why I did it
After PR #7344, 'make init' and/or 'make reset' will also build sonic slave dockers.
'-include rules/config.user' is supposed to be fine when the file is missing. However, when the file is missing, it generates a delayed error which later causes make init and make reset trying to build the sonic slave dockers.
How I did it
Define a do-nothing target for config.user to catch config.user build therefore preventing other builds to be triggered unexpectedly.
How to verify it
did make init and it is now only doing submodule init.