gpt4 book ai didi

git - 如何修复 bitbake 无法获取 git 错误?

转载 作者:行者123 更新时间:2023-12-04 12:15:32 24 4
gpt4 key购买 nike

在对 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 中,并手动将其放入我的构建文件夹中,但我仍然收到此错误。

最佳答案

您的问题是 bitbake 正在寻找 master 中的提交哈希。已重命名为 main 的分支.

SRC_URI = "git://github.com/coreos/go-systemd.git;branch=main"

关于git - 如何修复 bitbake 无法获取 git 错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68215012/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com