【发布时间】:2021-09-13 19:22:49
【问题描述】:
在对 Yocto rocko 版本进行 bitbaking 时出现此错误:
WARNING: go-systemd-4+gitb4a58d95188dd092ae20072bac14cece0e67c388-r0 do_fetch: Failed to fetch URL git://github.com/coreos/go-systemd.git, attempting MIRRORS if available
ERROR: go-systemd-4+gitb4a58d95188dd092ae20072bac14cece0e67c388-r0 do_fetch: Fetcher failure: Unable to find revision b4a58d95188dd092ae20072bac14cece0e67c388 in branch master even from upstream
ERROR: go-systemd-4+gitb4a58d95188dd092ae20072bac14cece0e67c388-r0 do_fetch: Fetcher failure for URL: 'git://github.com/coreos/go-systemd.git'. Unable to fetch URL from any source.
ERROR: go-systemd-4+gitb4a58d95188dd092ae20072bac14cece0e67c388-r0 do_fetch: Function failed: base_do_fetch
ERROR: Logfile of failure stored in: /home/ubu/build/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/go-systemd/4+gitb4a58d95188dd092ae20072bac14cece0e67c388-r0/temp/log.do_fetch.3021
ERROR: Task (/home/ubu/build/build-rpb/conf/../../layers/meta-virtualization/recipes-devtools/go/go-systemd_git.bb:do_fetch) failed with exit code '1'
go-systemd_git.bb 文件:
DESCRIPTION = "Go bindings to systemd socket activation, journal, D-Bus, and unit files"
HOMEPAGE = "https://github.com/coreos/go-systemd"
SECTION = "devel/go"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=19cbd64715b51267a47bf3750cc6a8a5"
SRCNAME = "systemd"
PKG_NAME = "github.com/coreos/go-${SRCNAME}"
SRC_URI = "git://${PKG_NAME}.git"
SRCREV = "f2399026b73c57c99648e1e5f8f0cacf9282001f"
PV = "4+git${SRCREV}"
RDEPENDS_${PN} += "bash"
S = "${WORKDIR}/git"
do_install() {
install -d ${D}${prefix}/local/go/src/${PKG_NAME}
cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
}
SYSROOT_PREPROCESS_FUNCS += "go_systemd_sysroot_preprocess"
go_systemd_sysroot_preprocess () {
install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
}
FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
我已经手动克隆了 repo,确认提交 b4a58d95188dd092ae20072bac14cece0e67c388 在 master 中,并手动将其放入我的构建文件夹,但我仍然收到此错误。
【问题讨论】:
-
打开配方修改
SRCREV -
@OleksandrKravchuk 我将 SRCREV 更改为最新版本并删除了下载的 go-systemd 版本,但它仍然抛出相同的错误,但对于该版本。
-
Em... 互联网连接问题?或者可能是错误的分支集?用
SRCREV显示整行代码。 -
我的互联网运行良好。这个 repo 的唯一分支是 master。
SRCREV = "f2399026b73c57c99648e1e5f8f0cacf9282001f" -
也显示
SRC_URI
标签: git fetch yocto bitbake linaro