profiles: improve SUPPORTED_DEVICES handling and profile identification
The actual handling does not allow to several devices share a DTS compatible string to allow image compatibility between them.
-
Take the lists as lists and select the profile after checking all possible candidates.
-
Throw a new validation exception when it is not possible to identify a profile which will help to identify inconsistencies.
This also can help to make a little bit clearer the difference between "profile" and "DTS compatible string".
*There is not need to add [profile] to SUPPORTED_DEVICES list anymore. https://github.com/openwrt/asu/blob/03287041d39a7cd59b87721642e3d84a948f1825/asu/util.py#L566
Reasoning about the reverts: https://github.com/openwrt/asu/pull/1511#issuecomment-3587079528 I would like to add that those commits would make harder to understand how we are handling the translation from Device Tree compatible strings to actual profiles names.
Before: ^1
'glinet,gl-mt2500': 'glinet_gl-mt2500-airoha',
'glinet,mt2500-emmc': 'glinet_gl-mt2500-airoha',
'glinet,gl-mt2500-airoha': 'glinet_gl-mt2500-airoha',
'glinet_gl-mt2500': 'glinet_gl-mt2500',
'glinet_gl-mt2500-airoha': 'glinet_gl-mt2500-airoha'
After:
'glinet_gl-mt2500': ['glinet,gl-mt2500', 'glinet,mt2500-emmc', 'glinet,gl-mt2500-airoha', 'glinet_gl-mt2500'],
'glinet_gl-mt2500-airoha': ['glinet,gl-mt2500-airoha', 'glinet,mt2500-emmc', 'glinet,gl-mt2500', 'glinet_gl-mt2500-airoha'],
Fixes: https://github.com/openwrt/asu/issues/1525 Fixes: https://github.com/openwrt/openwrt/issues/20566
Hard NAK.
Is this AI slop code? You've broken event logging, broken a bug fix and removed an important test case.
As I've already explained to you several times, the root cause of this issue is incorrect metadata coming from upstream. Attempting to work around the upstream issue in the ASU server does not fix anything and leaves several other things broken (specifically both sysupgrade and the Firmware Selector).
In those two reverts, included in this PR, you were mixing totally the translation or the DT compatible strings into actually profiles, that is not sanitize that is lose track of what are the strings sended by ASU clients(if they do not try to translate before sending them) and the actual profiles which are used in ImageBuilders. It is not AI sope code, a bit unrespectfully comment was that.
If you do not want to reason, it is over, It is really sad.