On 05/18/2021 08:03 PM, Bruce Ashfield wrote:
On Tue, May 18, 2021 at 12:55 AM Chen Qi <[email protected]> wrote:
Add nativesdk-sloci-image recipe which is basically from the
sloci-image-native recipe.

Copying the recipe is a bad idea.

What's wrong with just adding the inherit nativesdk in the existing
sloci recipe ?

Bruce

Hi Bruce,

This is because a recipe cannot inherit native and nativesdk at the same time. Hongxu once sent a patch to rename the native recipe to sloci-image_git.bb and use BBCLASSEXTEND = "native nativesdk", but that patch was rejected. So I figured that adding a nativesdk-sloci-image recipe is only remaining way to enable nativesdk support.

Maybe I should extract the common part to sloci-image.inc, and the native/nativesdk recipe only contains two lines like below:
require sloci-image.inc
inherit native (or inherit nativesdk)

What do you think?

Best Regards,
Chen Qi


Signed-off-by: Chen Qi <[email protected]>
---
  .../sloci-image/nativesdk-sloci-image_git.bb  | 27 +++++++++++++++++++
  1 file changed, 27 insertions(+)
  create mode 100644 recipes-containers/sloci-image/nativesdk-sloci-image_git.bb

diff --git a/recipes-containers/sloci-image/nativesdk-sloci-image_git.bb 
b/recipes-containers/sloci-image/nativesdk-sloci-image_git.bb
new file mode 100644
index 0000000..3c2b539
--- /dev/null
+++ b/recipes-containers/sloci-image/nativesdk-sloci-image_git.bb
@@ -0,0 +1,27 @@
+SUMMARY = "A simple CLI tool for packing rootfs into a single-layer OCI image"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=948cd8e59069fad992b0469af9ad7966"
+SRC_URI = "git://github.com/jirutka/sloci-image.git \
+           file://0001-sloci-image-fix-variant-quoting.patch \
+          "
+
+
+DEPENDS = ""
+
+SRCREV = "4015e49763e5a738026a5bbfcf32b38b5a4fa650"
+PV = "v0.1.0+git${SRCPV}"
+
+inherit nativesdk
+
+S = "${WORKDIR}/git"
+
+do_compile() {
+       :
+}
+
+do_install() {
+       cd ${S}
+        make PREFIX="${exec_prefix}" DESTDIR=${D} install
+}
+
+CLEANBROKEN = "1"
--
2.30.2






-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6528): 
https://lists.yoctoproject.org/g/meta-virtualization/message/6528
Mute This Topic: https://lists.yoctoproject.org/mt/82905144/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to