新的 Yocto 配方构建但工作目录在编译后被删除

New Yocto Recipe Builds but Work Directory is Deleted after Compilation

我正在尝试将 zbar 的配方从 0.10.0 更新到 0.20.1。这是原始食谱:

https://github.com/openembedded/meta-openembedded/blob/master/meta-oe/recipes-support/zbar/zbar_0.10.bb

我修改的食谱在这个问题的底部。该包确实可以编译,但问题是在 "packaging" 步骤中发生了一些事情, "work" 目录被清除,除了 "work" 目录中的 "temp" 目录。在编译期间,如果我列出工作目录中的文件,我期望的一切都存在,但编译成功后,有些东西会清理文件。我究竟做错了什么?

编译期间:

user@ubuntu:~/rpi/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/zbar/0.20.1-r0$ cd ../0.20.1-r0/ ; ls
build              image            pkgdata                sysroot-destdir
configure.sstate   license-destdir  pseudo                 temp
debugsources.list  package          recipe-sysroot
git                packages-split   recipe-sysroot-native

编译后:

user@ubuntu:~/rpi/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/zbar/0.20.1-r0$ cd ../0.20.1-r0/ ; ls
temp

Yocto 食谱:

DESRIPTION = "2D barcode scanner toolkit."
SECTION = "graphics"
LICENSE = "LGPL-2.1"

DEPENDS = "pkgconfig intltool-native libpng jpeg"

LIC_FILES_CHKSUM = "file://LICENSE;md5=243b725d71bb5df4a1e5920b344b86ad"

S = "${WORKDIR}/git"

SRCREV = "edcf08b49e0a5fe71c18fa9d4b8ed83ed8fc9082"
SRC_URI = "git://github.com/mchehab/zbar.git"

inherit autotools pkgconfig

EXTRA_OECONF = " --without-x --without-imagemagick --without-qt --without-python2 --disable-video --without-gtk"

FILES_${PN} += "${bindir}"
FILES_${PN} += "${libdir}"

do_install_append() {
    echo "done..."
}

这是因为 rm_work class。您可以删除,

INHERIT += "rm_work"

这来自 local.conf 或在相应的图像配方文件中。或者您可以使用

仅针对您的食谱禁用 rm_work
RM_WORK_EXCLUDE += "zbar"

conf/local.conf.