diff --git a/classes/vigiles.bbclass b/classes/vigiles.bbclass index ecf49e8..4780389 100644 --- a/classes/vigiles.bbclass +++ b/classes/vigiles.bbclass @@ -183,7 +183,6 @@ def vigiles_write_manifest(d, tdw_tag, dict_out): # their respective do_vigiles_pkg() tasks. ## VIGILES_PREFERRED_BACKFILL = "\ - virtual/kernel \ virtual/libc \ " @@ -332,6 +331,11 @@ def vigiles_image_collect(d): if boot_pn: backfill_list.append(boot_pn) + kernel_pn = d.getVar('VIGILES_KERNEL_PN') or \ + d.getVar('PREFERRED_PROVIDER_virtual/kernel') or '' + if kernel_pn: + backfill_list.append(kernel_pn) + initramfs_image = d.getVar('INITRAMFS_IMAGE', True) if initramfs_image: backfill_list.append(initramfs_image) @@ -393,10 +397,15 @@ def vigiles_image_depends(d): if boot_pn: deps.append('%s:do_vigiles_uboot_config' % boot_pn) + kernel_pn = d.getVar('VIGILES_KERNEL_PN') or \ + d.getVar('PREFERRED_PROVIDER_virtual/kernel') or '' + if kernel_pn: + deps.append('%s:do_vigiles_kconfig' % kernel_pn) + deps.append('%s:do_vigiles_pkg' % kernel_pn) + return ' '.join(deps) -do_vigiles_image[depends] += "virtual/kernel:do_vigiles_kconfig" do_vigiles_image[depends] += " ${@vigiles_image_depends(d)} " @@ -463,9 +472,17 @@ python do_vigiles_kconfig() { } -do_vigiles_kconfig[depends] += "virtual/kernel:do_configure" +python() { + + pn = d.getVar('PN') + kernel_pn = d.getVar('VIGILES_KERNEL_PN') or \ + d.getVar('PREFERRED_PROVIDER_virtual/kernel') or '' + + if pn == kernel_pn: + bb.build.addtask('do_vigiles_kconfig', 'do_savedefconfig', 'do_configure', d) + d.appendVarFlag('do_vigiles_kconfig', 'depends', ' %s:do_configure' % pn) +} -addtask do_vigiles_kconfig after do_configure before do_savedefconfig do_vigiles_kconfig[nostamp] = "1" diff --git a/conf/vigiles.conf b/conf/vigiles.conf index 0944db1..3c86218 100644 --- a/conf/vigiles.conf +++ b/conf/vigiles.conf @@ -32,6 +32,7 @@ VIGILES_KERNEL_CONFIG ??= "auto" VIGILES_UBOOT_CONFIG ??= "auto" VIGILES_UBOOT_PN ??= "${@d.getVar('PREFERRED_PROVIDER_virtual/bootloader') or ''}" +VIGILES_KERNEL_PN ??= "${@d.getVar('PREFERRED_PROVIDER_virtual/kernel') or ''}" # This list can include recipe names (PN) or specific CVE IDs that should *not* # be included in CVE Reports and notifications.