When you type the machine name in the project configuration page, instead of selecting a suggestion from the type ahead, we should be checking that the machine name does not include spaces. Right now, you can type any spaces you want in there and save the invalid machine.
Created attachment 2866 [details] Design - Validating machine input
I was asked to check if I could still reproduce this, and unfortunately I can. This is what's possible: 1. You can type a space in the middle of a valid machine name and save 2. You can type a space after a valid machine name and save 3. You can type a space before a valid machine name and save In all 3 cases, your builds will fail during sanity checks: OE-core's config sanity checker detected a potential misconfiguration. Either fix the cause of this error or at your own risk disable the checker (see sanity.conf). Following is the list of potential problems / advisories: Please set a valid MACHINE in your local.conf or environment We should remove any spaces before or after the machine name on saving (2 and 3 above). To deal with 1, see the attached design document.
Part of the "UI cleaning" work. Moving to 2.2
Submitted https://patchwork.openembedded.org/patch/137645/
I have tested this patch and it passes all three of Belen's test cases for me. My only surprise was that when you insert a space in front you will probably not see the error message because it is hidden behind the lookahead options. If you click to the side, the lookahead disappears and the error message is then visible. To me this acceptable,since the red halo around the entry is visible and the Save button is indeed disabled. Disappearing the lookahead is just a nice-to-have.
Patch sent upstream.