nuttx-9.0.0-RC1
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEZsSDKhZezJNUiVogl1DtfmkrmeIFAl6nvWAACgkQl1Dtfmkr
meJLmhAAoBqo3EMaWOh8hdhoAj2RBpkAzMe1pbEyApf05DnbRuY+hgR6psKY/kf9
GM/gaPG8+6bttrQ9xTnw51iVtjudmvTxvDPSuHeh5IdpVAg7V9+SjceN0BYHB683
c/Ohms/eejLFIB0WoFGx4SRhhg7/B7rn6IDntSvnimUDxxFpusnlOGnG0BZd9j0M
a9bF9VcMNDrLt/IoMldU1B4ksYIdPKlEgZHNSch/YQ+TPxOHPYxNNzRa04fk4sXr
xYu9aOaV5OwNS6wVdbK7CSb3Ua6uGL153r6hr0V+LNTh+msdZiYdRFst99isvMzM
4FwbGcdAB2ssZ3PIHNGd3pdod/q7IkPdBO2cAfxjAEoptCiC3LvVFC5hnyReYv5v
EfU8NsBIXI3BSahrAM/x9WSgulnpWVlnomnadHIVi0zlpZXZVcu5je1XNvoS8NF5
yN8y1pQxzUboRxp6Ndy5XG/kvq0S6orv6S7ZvCMyTBbxmnJ4AHn5aAs2KmU+XjBj
cqVKuqpSB2/rBjLhxAKT8SfUUBaMZc1cBazY09Ttujlt2zxT+fRCU/AqhBVMrN5C
quFWKnansdrdFNxFJWvN2TipV2Jrm+11gQz49DH2/0uAHwEVcWvjVSS0tiqOyW/m
ij7wP9JryTfl4imsA4bHEsKiNI2AeCl/43Aww+b+zSilJWsoyMI=
=dRe8
-----END PGP SIGNATURE-----
tools/sethost.sh:  Correct error in setting a different host.

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

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:

   $ tools/configure.sh -c stm32f4discovery:nsh
      Copy files
      Select CONFIG_HOST_WINDOWS=y
      Select CONFIG_WINDOWS_CYGWIN=y
      Refreshing...
    .config:62:warning: override: reassigning to symbol HOST_WINDOWS
    .config:62:warning: override: HOST_WINDOWS changes choice state

Those warnings are eliminated by this changed.

Tested by repeatedly doing:

  tools/configure.sh -c stm32f4discovery:nsh
1 file changed