Skip to content

Commit 5e26903

Browse files
committed
meta-riscv: add deprecation warning function, message
Add classes/warn-deprecated-machines.bbclass with a Python function, then INHERIT it in conf/layer.conf. Start with deprecating the following MACHINEs: - beaglev - visionfive These will be removed with the Yocto 6.1 release. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
1 parent 126ab6d commit 5e26903

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Print a warning when a build is started with a MACHINE which is slated to be
2+
# removed as of a future Yocto Project release.
3+
4+
python warn_deprecated_machines() {
5+
deprecated_machines = {
6+
"beaglev-starlight-jh7100": "Yocto 6.1",
7+
"visionfive": "Yocto 6.1",
8+
}
9+
10+
machine = d.getVar("MACHINE")
11+
12+
if machine in deprecated_machines:
13+
removal_release = deprecated_machines[machine]
14+
bb.warn(
15+
f"MACHINE='{machine}' is deprecated and will no longer be supported "
16+
f"after {removal_release}. Please consider an alternative BSP."
17+
)
18+
}
19+
20+
addhandler warn_deprecated_machines
21+
warn_deprecated_machines[eventmask] = "bb.event.BuildStarted"

conf/layer.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,6 @@ COMPATIBLE_HOST:pn-samba:riscv32 = "null"
157157
COMPATIBLE_HOST:pn-smbnetfs:riscv32 = "null"
158158
COMPATIBLE_HOST:pn-gnome-control-center:riscv32 = "null"
159159
COMPATIBLE_HOST:pn-thunar-shares-plugin:riscv32 = "null"
160+
161+
# Use our deprecation warning function
162+
INHERIT += "warn-deprecated-machines"

0 commit comments

Comments
 (0)