Skip to content

Commit

Permalink
[u-boot] Fixup for an unset PREFERRED_PROVIDERS_virtual/bootloader
Browse files Browse the repository at this point in the history
In the rare event that there are multiple proviers for virtual/bootloader,
but no preference is set, we would cause a build failure when setting our
task dependencies, as BitBake won't give you a fallback.

So, when we are specifying dependencies, make sure we have a default
and set dependencies on the package's PN itself, rather than the virtual.
  • Loading branch information
mochel-timesys committed Jun 8, 2020
1 parent 0c7a428 commit 867bf76
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions classes/vigiles.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def vigiles_image_depends(d):
deps = [ ':'.join([_pn, 'do_vigiles_pkg']) for _pn in backfill_pns ]
_uboot = d.getVar('PREFERRED_PROVIDER_virtual/bootloader', True) or ''
if _uboot:
deps.append('virtual/bootloader:do_vigiles_uboot_config')
deps.append('%s:do_vigiles_uboot_config' % _uboot)

return ' '.join(deps)

Expand Down Expand Up @@ -516,10 +516,14 @@ python do_vigiles_uboot_config() {

python() {
if bb.data.inherits_class('uboot-config', d):
bb.build.addtask('do_vigiles_uboot_config', 'do_rm_work', 'do_compile', d)
pn = d.getVar('PN')
bpn = d.getVar('PREFERRED_PROVIDER_virtual/bootloader') or ''

if pn == bpn:
bb.build.addtask('do_vigiles_uboot_config', 'do_rm_work', 'do_compile', d)
d.appendVarFlag('do_vigiles_uboot_config', 'depends', ' %s:do_compile' % pn)
}

do_vigiles_uboot_config[depends] += "virtual/bootloader:do_compile"
do_vigiles_uboot_config[nostamp] = "1"


Expand Down

0 comments on commit 867bf76

Please sign in to comment.