tools/sethost.sh: Correct error in setting a different host. #897
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.
Summary
In an older PR, the standard kconfig-tweak calls were replaced with sed edit. This is an incorrect change and results in invalid configurations. This change restores the use of kconfig-tweak and always generates correct configurations.
This change resolves issue #386
Impact
sed edits do not handle all of the dependencies correct and generates invalid configurations. Most defconfig files specify Linux by default, so you will only see the effect of the corruped configuration when sethost changes changes to a different configuration. Then, when 'make olddefconfig' is subsequentyly run, the corruption in the defconfig file is reflected by warnings such as:
Those and similar warnings are eliminated by this changed.
Testing
Tested by repeatedly doing:
tools/configure.sh -c stm32f4discovery:nsh
I've also tested these configurations and they all work (after one forced push):
At this point, I have not come up with any way that results in a corrupted defconfig file or in any warning from 'make olddefconfig'
BTW: If you want to experiment with this, you don't need to have Windows or a macOS. configure.sh doesn't care what platform you are on. So you can configure -l, -g, -c, -m on any plaform, including Linux.