priv-kweihmann / oelint-adv

Advanced oelint
BSD 2-Clause "Simplified" License
56 stars 27 forks source link

Wrong warning:oelint.vars.dependsordered detection #658

Closed mvkonovalov closed 4 hours ago

mvkonovalov commented 4 hours ago

Hello,

for example I have .inc file with ordered DEPENDS and then I include the file to .bb which also has addition DEPENDS ordered. In the case I get the following issue:

warning:oelint.vars.dependsordered:'DEPENDS' entries should be ordered alphabetically

It is expected that warning is not triggered as in each files DEPENDS is ordered.

mvkonovalov commented 4 hours ago

If manually merge DEPENDS from .inc to .bb and sort resulting DEPENDS then no issue is triggered.

priv-kweihmann commented 4 hours ago

So you answered your own question I guess.

Yes this is expected behavior. Also iirc using append instead of just adding += to the list should be fine

priv-kweihmann commented 4 hours ago

I don't see that as a bug - I will accept community patches, but do not tempt to fix that on my own

priv-kweihmann commented 4 hours ago

To give a more technical explanation. It doesn't matter much if the depends are ordered in each file, what really matters is to give everyone a quick overview on a recipe level what this one depends on. "Hiding" stuff in include files shadows that heavily.

If needed that should be moved to a bbclass (which doesn't produce those warnings).

In conclusion depends in include files are one of the reasons for this rule, so again not a bug for me

mvkonovalov commented 4 hours ago

So you answered your own question I guess.

Yes this is expected behavior. Also iirc using append instead of just adding += to the list should be fine

I don't want to manually merge (This was mentioned as proof that issue related to fact that DEPENDS is checked after being appending but not in each files). There are lot of such recipes in poky, U-Boot for example. Includes are used to share common code, DEPENDS in the case.