[Buildroot] [PATCH 15/18] checkpackagelib/lib_config.py: CommentsMenusPackagesOrder: check the order of menu of menus

Ricardo Martincoski ricardo.martincoski at gmail.com
Fri Oct 4 02:26:31 UTC 2019


Hello,

My free time comes and goes, sorry about my slow review.

On Wed, Sep 25, 2019 at 05:01 AM, Jerzy Grzegorek wrote:

>> On Tue, Sep 03, 2019 at 06:13 PM, Jerzy Grzegorek wrote:
>>
>> [snip]
>>> +++ b/utils/checkpackagelib/lib_config.py
>>> @@ -65,6 +65,10 @@ class CommentsMenusPackagesOrder(_CheckFunction):
>>>       comments_order_checking = [False]
>>>       print_comment_warning = [True]
>>>   
>>> +    first_menu = [True, True]
>>> +    menu = [""]
>>> +    print_menu_warning = [True]
>> This is not good. Please use instance variables initialized in before().
>> before() is called... well... *before* every file is processed :-)
>> This will ensure the correct initial state for each file being processed.
> 
> So, should I also use instance variables
> 
>      menu_of_packages = [""]
>      package = [""]
>      print_package_warning = [True]
> 
> initialized in before()?

I think so.
If you will include this in this series or not, it's up to you.
Right now I don't know a good example to demonstrate a false warning generated
by those variables. But the code would be more future-proof if we change them.


Regards,
Ricardo


More information about the buildroot mailing list