@@ -646,3 +646,14 @@ recipe would use the following setting:
```
HEADERS_INSTALL_EXTRA += "nvidia"
```
+
+### Architecture for dpkg-raw packages
+
+The intent of the dpkg-raw class is to easily package configuration and data
+files into a Debian package. Packages to be compiled should really use other
+dpkg classes where support for cross-compilation and multiarch is provided
+and tested. `DPKG_ARCH` is now set to `all` for `dpkg-raw` recipes and a
+deprecation warning will be raised if overriden.
+
+This change fixes an issue where a `dpkg` package is built for `-compat`
+or `-native` and `DEPENDS` on a `dpkg-raw` package.
@@ -7,6 +7,9 @@ inherit dpkg
D = "${WORKDIR}/image"
+# Create a binary-indep package
+DPKG_ARCH = "all"
+
# Populate folder that will be picked up as package
do_install() {
bbnote "Put your files for this package in $""{D}"
@@ -17,6 +20,11 @@ addtask install after do_patch do_transform_template before do_prepare_build
do_prepare_build[cleandirs] += "${S}/debian"
do_prepare_build() {
+ if [ "${DPKG_ARCH}" != "all" ]; then
+ bbwarn "support for building binary-arch packages with " \
+ "dpkg-raw is deprecated and will be removed"
+ fi
+
cd ${D}
find . -maxdepth 1 ! -name .. -and ! -name . -and ! -name debian | \
sed 's:^./::' > ${S}/debian/${PN}.install
Packages created by dpkg-raw are really for configuration and data files and therefore architecture independent. DPKG_ARCH is now set to all and a warning will be produced if changed by the recipe (this will later be turned into an error). Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com> --- RECIPE-API-CHANGELOG.md | 11 +++++++++++ meta/classes/dpkg-raw.bbclass | 8 ++++++++ 2 files changed, 19 insertions(+)