Hi Awais,

On 8/11/22 05:23, Belal, Awais wrote:
Hi Quentin,


Thanks for the feedback.


I think this might be a bit too much. e.g. I could have a DTS/DTB named
this-is-a.dtb.dtb and another one this-is-a.dtb and this would say it is
a duplicate whereas it isn't (poor naming choice, though.. yes :) ).

I believe that:
for DTB in $(echo "${DTBS}" | tr ' ' '\n' | sort -u); do

would work and avoid unnecessary loops.


this would definitely avoid unnecessary loops however I don't think sorting 
would be the right thing here as the first dt in the list gets to become the 
default config which is something assumed for the runtime and sorting would 
break that. If we want to cover up the corner case you described above would 
something such fit the bill


I completely forgot about this. I think this is a not so great behavior :/ But nothing to discuss in this patch :)


echo $DTBS | tr ' ' '\n' | grep -xq $DTB && continue


Don't forget to quote the shell variables to make shellcheck happy :)


I believe using sort -u here should be enough for this second diff?


sort -u wouldn't help here if the same name dt is present in KERNEL_DEVICETREE 
and the EXTERNEL_KERNEL_DEVICETREE as we'll run into the same problem of having 
the same dt being packaged twice. I'd rather use the same technique here if you 
agree.


Sounds like a plan :)

Cheers,
Quentin
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169275): 
https://lists.openembedded.org/g/openembedded-core/message/169275
Mute This Topic: https://lists.openembedded.org/mt/92888948/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to