Skip to content

Commit

Permalink
owut: fix processing of device defaults
Browse files Browse the repository at this point in the history
Some device profiles specify the removal of subtarget default packages.
We were ignoring this, resulting in the removed package being included,
and also giving bad informational messages about the package.

Fixes: #30
Signed-off-by: Eric Fahlgren <[email protected]>
  • Loading branch information
efahl committed Jan 25, 2025
1 parent eaca182 commit a95d383
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion files/owut
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,18 @@ function collect_defaults(board, device)
// Use both board json for its defaults, then add the device-specific
// defaults to make one big defaults list.

let defaults = [...board, ...device];
let defaults = []; // Must filter out and device-specific removals.
for (let pkg in board) {
if (! ("-"+pkg in device)) {
push(defaults, pkg);
}
}
for (let pkg in device) {
if (! match(pkg, /^-/)) {
push(defaults, pkg);
}
}

for (let pkg in packages.non_upgradable) {
if (! (pkg in defaults)) push(defaults, pkg);
}
Expand Down

0 comments on commit a95d383

Please sign in to comment.