[v4,13/13] u-boot: Deprecate BUILD_DEPENDS in favor of DEBIAN_BUILD_DEPENDS

Message ID 78e84769718556b15a8a81b927df68c11db591bf.1602079290.git.jan.kiszka@siemens.com
State Superseded, archived
Headers show
Series Complete backlog: SDK, assorting fixed and cleanups | expand

Commit Message

Jan Kiszka Oct. 7, 2020, 5:01 a.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

Aligns this recipe with deb_debianize. Provide a compat path along with
a warning to ease migration.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 RECIPE-API-CHANGELOG.md                           |  4 ++++
 meta/recipes-bsp/u-boot/files/debian/control.tmpl |  2 +-
 meta/recipes-bsp/u-boot/u-boot-custom.inc         | 10 ++++++++--
 3 files changed, 13 insertions(+), 3 deletions(-)

Patch

diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
index ac9d8d63..6e40fbcd 100644
--- a/RECIPE-API-CHANGELOG.md
+++ b/RECIPE-API-CHANGELOG.md
@@ -252,3 +252,7 @@  with ${D} which needs to be filled explicitly in do_install as before.
 ISARROOT variable is now removed from the bitbake environment. It is unset
 after the initial setup. It is replaced with dedicated variables like
 BITBAKEDIR, SCRIPTSDIR and TESTSUITEDIR.
+
+### Deprecate BUILD_DEPENDS in u-boot-custom.inc
+
+Use DEBIAN_BUILD_DEPENDS instead, to align with deb_debianize.
diff --git a/meta/recipes-bsp/u-boot/files/debian/control.tmpl b/meta/recipes-bsp/u-boot/files/debian/control.tmpl
index 0ab3a295..9379be7d 100644
--- a/meta/recipes-bsp/u-boot/files/debian/control.tmpl
+++ b/meta/recipes-bsp/u-boot/files/debian/control.tmpl
@@ -2,7 +2,7 @@  Source: ${PN}
 Section: admin
 Priority: optional
 Standards-Version: 3.9.6
-Build-Depends: ${BUILD_DEPENDS}
+Build-Depends: ${DEBIAN_BUILD_DEPENDS}
 Maintainer: ISAR project <isar-users@googlegroups.com>
 
 Package: u-boot-${MACHINE}
diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc
index 41124fc3..34bf91bf 100644
--- a/meta/recipes-bsp/u-boot/u-boot-custom.inc
+++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc
@@ -16,10 +16,16 @@  inherit dpkg
 
 SRC_URI += "file://debian/"
 
-BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git"
+python() {
+    if d.getVar('BUILD_DEPENDS'):
+        bb.warn("u-boot-custom: Deprecated use of BUILD_DEPENDS, please switch to DEBIAN_BUILD_DEPENDS")
+        d.setVar('DEBIAN_BUILD_DEPENDS', d.getVar('BUILD_DEPENDS'))
+}
+
+DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git"
 
 TEMPLATE_FILES = "debian/control.tmpl"
-TEMPLATE_VARS += "MACHINE BUILD_DEPENDS"
+TEMPLATE_VARS += "MACHINE DEBIAN_BUILD_DEPENDS"
 
 U_BOOT_TOOLS_PACKAGE ?= "0"