From dce6227f656b61e8eebf4eb799751660a9b7468c Mon Sep 17 00:00:00 2001
From: Stefan Schmidt <stefan.schmidt@huawei.com>
Date: Thu, 9 Dec 2021 14:21:59 +0100
Subject: [PATCH] ot-br-posix: Move writables usage from staging to
 meta-oniro-core bbappend

This is a follow up fix for e791c29b819a629930bbde6fd7e23bdd9277f31f

The writables part is correct, but it can not live in the
meta-oniro-staging layer. This layer is in preparation of upstreaming
and the writables class we have in core is not at this stage yet.

Instead we split out the writables part into a bbappend to live in
meta-oniro-core. This solved an implicit layer dependcy from staging to
core as well which we saw with the meta-openharmony build.

Signed-off-by: Stefan Schmidt <stefan.schmidt@huawei.com>
---
 .../openthread/ot-br-posix_git.bbappend                   | 8 ++++++++
 .../recipes-connectivity/openthread/ot-br-posix_git.bb    | 5 +----
 2 files changed, 9 insertions(+), 4 deletions(-)
 create mode 100644 meta-oniro-core/recipes-connectivity/openthread/ot-br-posix_git.bbappend

diff --git a/meta-oniro-core/recipes-connectivity/openthread/ot-br-posix_git.bbappend b/meta-oniro-core/recipes-connectivity/openthread/ot-br-posix_git.bbappend
new file mode 100644
index 00000000..ae061d19
--- /dev/null
+++ b/meta-oniro-core/recipes-connectivity/openthread/ot-br-posix_git.bbappend
@@ -0,0 +1,8 @@
+# SPDX-FileCopyrightText: Huawei Inc.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+inherit writables
+
+WRITABLES = "data"
+WRITABLE_PATH[data] = "/var/lib/thread/"
diff --git a/meta-oniro-staging/recipes-connectivity/openthread/ot-br-posix_git.bb b/meta-oniro-staging/recipes-connectivity/openthread/ot-br-posix_git.bb
index 8df1fe8d..16a0f921 100644
--- a/meta-oniro-staging/recipes-connectivity/openthread/ot-br-posix_git.bb
+++ b/meta-oniro-staging/recipes-connectivity/openthread/ot-br-posix_git.bb
@@ -28,10 +28,7 @@ S = "${WORKDIR}/git"
 
 DEPENDS = "autoconf-archive dbus readline avahi jsoncpp boost"
 
-inherit cmake systemd writables
-
-WRITABLES = "data"
-WRITABLE_PATH[data] = "/var/lib/thread/"
+inherit cmake systemd
 
 SYSTEMD_SERVICE_${PN} = "otbr-agent.service otbr-web.service"
 
-- 
GitLab