Skip to content
Snippets Groups Projects
  • John Thomson's avatar
    27f68a39
    kernel: fix KernelPackage when all KCONFIG are versioned · 27f68a39
    John Thomson authored
    
    If a kernel package was defined where all KCONFIG symbols were dynamic,
    and versioned, no FILES would be installed, as the foreach evaluation was
    providing the value of the variable defined by the KCONFIG symbol name
    including the version test
    
    Fix this by calling the version_filter function on the list of KCONFIG
    variable names run through by foreach
    
    Example, kernel 6.1:
    KCONFIG:=CONFIG_OLD@lt6.1 CONFIG_NEW@ge6.1
    filter-out any KCONFIG settings forced by package:
    CONFIG_OLD@lt6.1 CONFIG_NEW@ge6.1
    there are dynamic settings, so for each of them,
    get the value of the make variable defined by symbol name:
        CONFIG_OLD@lt6.1 is not set
        CONFIG_NEW@ge6.1 is not set
      versus
        CONFIG_OLD is not set
        CONFIG_NEW=m
    test if any of these are m, or y
    if yes, install files, otherwise, nothing to install
    
    Signed-off-by: default avatarJohn Thomson <git@johnthomson.fastmail.com.au>
    (cherry picked from commit b3448b3fdb59d25dce05991dc8f322c1020b090b)
    27f68a39
    History
    kernel: fix KernelPackage when all KCONFIG are versioned
    John Thomson authored
    
    If a kernel package was defined where all KCONFIG symbols were dynamic,
    and versioned, no FILES would be installed, as the foreach evaluation was
    providing the value of the variable defined by the KCONFIG symbol name
    including the version test
    
    Fix this by calling the version_filter function on the list of KCONFIG
    variable names run through by foreach
    
    Example, kernel 6.1:
    KCONFIG:=CONFIG_OLD@lt6.1 CONFIG_NEW@ge6.1
    filter-out any KCONFIG settings forced by package:
    CONFIG_OLD@lt6.1 CONFIG_NEW@ge6.1
    there are dynamic settings, so for each of them,
    get the value of the make variable defined by symbol name:
        CONFIG_OLD@lt6.1 is not set
        CONFIG_NEW@ge6.1 is not set
      versus
        CONFIG_OLD is not set
        CONFIG_NEW=m
    test if any of these are m, or y
    if yes, install files, otherwise, nothing to install
    
    Signed-off-by: default avatarJohn Thomson <git@johnthomson.fastmail.com.au>
    (cherry picked from commit b3448b3fdb59d25dce05991dc8f322c1020b090b)