From 6573902f8efb8e02202f025b01adca6101d657ae Mon Sep 17 00:00:00 2001
From: Robert Drab <robert.drab@huawei.com>
Date: Tue, 16 Feb 2021 11:39:52 +0100
Subject: [PATCH] openharmony-image-*: Extract images common parts

Include file with common definitions to avoid duplication.

Signed-off-by: Robert Drab <robert.drab@huawei.com>
---
 .../recipes-core/images/openharmony-image-base.bb        | 9 ++-------
 .../recipes-core/images/openharmony-image-common.inc     | 7 +++++++
 .../recipes-core/images/openharmony-image-extra.bb       | 9 ++-------
 3 files changed, 11 insertions(+), 14 deletions(-)
 create mode 100644 meta-ohos-core/recipes-core/images/openharmony-image-common.inc

diff --git a/meta-ohos-core/recipes-core/images/openharmony-image-base.bb b/meta-ohos-core/recipes-core/images/openharmony-image-base.bb
index fa7c03b2..97bfd51b 100644
--- a/meta-ohos-core/recipes-core/images/openharmony-image-base.bb
+++ b/meta-ohos-core/recipes-core/images/openharmony-image-base.bb
@@ -1,8 +1,3 @@
 # Base this image on core-image-base
-include recipes-core/images/core-image-base.bb
-
-IMAGE_INSTALL_append = " \
-			packagegroup-net-essentials \
-			packagegroup-net-tools \
-			packagegroup-ble-essentials \
-			"
+require recipes-core/images/core-image-base.bb
+require openharmony-image-common.inc
diff --git a/meta-ohos-core/recipes-core/images/openharmony-image-common.inc b/meta-ohos-core/recipes-core/images/openharmony-image-common.inc
new file mode 100644
index 00000000..7626b16a
--- /dev/null
+++ b/meta-ohos-core/recipes-core/images/openharmony-image-common.inc
@@ -0,0 +1,7 @@
+# Common settings for all OpenHarmony images
+
+IMAGE_INSTALL_append = "\
+			packagegroup-net-essentials \
+			packagegroup-net-tools \
+			packagegroup-ble-essentials \
+			"
diff --git a/meta-ohos-core/recipes-core/images/openharmony-image-extra.bb b/meta-ohos-core/recipes-core/images/openharmony-image-extra.bb
index 974e1a4b..39cd3be4 100644
--- a/meta-ohos-core/recipes-core/images/openharmony-image-extra.bb
+++ b/meta-ohos-core/recipes-core/images/openharmony-image-extra.bb
@@ -1,8 +1,3 @@
 # Base this image on core-image-weston
-include recipes-graphics/images/core-image-weston.bb
-
-IMAGE_INSTALL_append = " \
-			packagegroup-net-essentials \
-			packagegroup-net-tools \
-			packagegroup-ble-essentials \
-			"
+require recipes-graphics/images/core-image-weston.bb
+require openharmony-image-common.inc
-- 
GitLab