更新以前基于主分支但现在随版本发布的配方

时间:2018-10-22 08:20:22

标签: embedded-linux yocto bitbake

我有一个食谱canboat,该食谱以前没有官方发行版本,并且是基于SRCREV分支上的master的。

canboat.bb

SUMMARY = "CANBOAT- A small but effective set of command-line utilities to work with CAN networks on BOATs."
SECTION = "base"
LICENSE = "GPLv3"

DEPENDS += "libxslt-native canboat-native"

LIC_FILES_CHKSUM = "file://GPL;md5=05507c6da2404b0e88fe5a152fd12540"

SRC_URI = "git://github.com/canboat/canboat.git;branch=${SRCBRANCH} \
           file://0001-Do-not-use-root-user-group-during-install.patch \
           file://0001-Define-ANALYZEREXEC.patch \
           file://0001-use-php-instead-of-php5.patch \
          "
SRCBRANCH = "master"
SRCREV = "93b2ebfb334d7a9750b6947d3a4af9b091be2432"

S = "${WORKDIR}/git"

PREFIX ?= "${root_prefix}"
#PREFIX_class-native = "${prefix}"

EXTRA_OEMAKE_append_class-target = " ANALYZEREXEC=analyzer "

do_compile() {
    oe_runmake
}
do_install() {
   oe_runmake DESTDIR=${D} PREFIX=${root_prefix} EXEC_PREFIX=${exec_prefix} install

}

RDEPENDS_${PN}_append_class-target = " php-cli perl"

BBCLASSEXTEND = "native nativesdk"

几天前main repository正式发布了一个版本,我想更新配方以指向v.1.0.0

工作流程

  1. 我使用了devtool add canboat [link-tar-ball]
  2. 复制了原始canboat.bb中的更改
  3. 将配方名称更改为canboat_1.0.0.bb,因为该配方现在具有${PV}用于提取正确的版本

更新的食谱

现在仅指向SRC_URI的{​​{1}}是.tar.gz并且已经更新。

md5sum

我尝试SUMMARY = "CANBOAT- A small but effective set of command-line utilities to work with CAN networks on BOATs." SECTION = "base" LICENSE = "GPLv3" DEPENDS += "libxslt-native canboat-native" LIC_FILES_CHKSUM = "file://GPL;md5=05507c6da2404b0e88fe5a152fd12540" SRC_URI = "git://github.com/canboat/canboat.git;branch=${SRCBRANCH} \ file://0001-Do-not-use-root-user-group-during-install.patch \ file://0001-Define-ANALYZEREXEC.patch \ file://0001-use-php-instead-of-php5.patch \ " SRC_URI = "https://github.com/canboat/canboat/archive/v${PV}.tar.gz" SRC_URI[md5sum] = "6ee6162d30faa3b3f1ff068cc7a70a60" SRC_URI[sha256sum] = "6bf1050a83a5d7eb8351547c10e7e2ae2e1811250d50a63880074f0c07ec672e" S = "${WORKDIR}/git" PREFIX ?= "${root_prefix}" #PREFIX_class-native = "${prefix}" EXTRA_OEMAKE_append_class-target = " ANALYZEREXEC=analyzer " do_compile() { oe_runmake } do_install() { oe_runmake DESTDIR=${D} PREFIX=${root_prefix} EXEC_PREFIX=${exec_prefix} install } RDEPENDS_${PN}_append_class-target = " php-cli perl" BBCLASSEXTEND = "native nativesdk" 检查构建过程

错误

我收到如下质量检查错误:

bitbake -k canboat

我尝试进入上述文件夹,但是 QA Issue: canboat-native: LIC_FILES_CHKSUM points to an invalid file: /home/des/Yocto/PHYTEC_BSPs/yocto_fsl/build/tmp/work/x86_64-linux/canboat-native/1.0.0-r0/git/GPL 文件夹中没有GPL文件。

结构如下:

canboat_1.0.0

. ├── canboat-1.0.0 │   ├── actisense-serial │   ├── airmar │   ├── analyzer │   ├── candump2analyzer │   ├── common │   ├── config │   ├── group-function │   ├── ip │   ├── n2kd │   ├── nmea0183 │   ├── samples │   ├── send-message │   ├── socketcan-writer │   └── util ├── git └── temp 文件夹中没有任何内容。

问题

如何克服git测试,有没有更好的方法来更新食谱?

1 个答案:

答案 0 :(得分:2)

您的新食谱中不需要S = "${WORKDIR}/git"。当您从tarball引用特定版本时,yocto使用${PN}-${PV}

取消引用路径

这是因为提取tarball时,源路径将为${WORKDIR}/${PN}-${PV}

此外,您可以在无法找到do_compilemake文件的情况下,通过默认调用Makefile.am/in来删除食谱的autoconf部分作为Yocto。