0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

yoctoレシピが参照するgithubリポジトリが存在しない!?

Last updated at Posted at 2024-11-26

コミットIDの検証を省きたい

ハッシュタグの不一致

とあるLinuxポーティングをビルドしていたところ、参照しているGithub上のリポジトリから何故か取ってこられない症状に見舞われました。

DEBUG: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"; export PATH="/home/toor/V2L/yocto_rzboard/poky/scripts/native-intercept:/home/toor/V2L/yocto_rzboard/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/toor/V2L/yocto_rzboard/build/tmp/work/x86_64-linux/bmap-tools-native/3.5+gitAUTOINC+db7087b883-r0/recipe-sysroot-native/usr/bin/python3-native:/home/toor/V2L/yocto_rzboard/poky/scripts:/home/toor/V2L/yocto_rzboard/build/tmp/work/x86_64-linux/bmap-tools-native/3.5+gitAUTOINC+db7087b883-r0/recipe-sysroot-native/usr/bin/x86_64-linux:/home/toor/V2L/yocto_rzboard/build/tmp/work/x86_64-linux/bmap-tools-native/3.5+gitAUTOINC+db7087b883-r0/recipe-sysroot-native/usr/bin:/home/toor/V2L/yocto_rzboard/build/tmp/work/x86_64-linux/bmap-tools-native/3.5+gitAUTOINC+db7087b883-r0/recipe-sysroot-native/usr/sbin:/home/toor/V2L/yocto_rzboard/build/tmp/work/x86_64-linux/bmap-tools-native/3.5+gitAUTOINC+db7087b883-r0/recipe-sysroot-native/usr/bin:/home/toor/V2L/yocto_rzboard/build/tmp/work/x86_64-linux/bmap-tools-native/3.5+gitAUTOINC+db7087b883-r0/recipe-sysroot-native/sbin:/home/toor/V2L/yocto_rzboard/build/tmp/work/x86_64-linux/bmap-tools-native/3.5+gitAUTOINC+db7087b883-r0/recipe-sysroot-native/bin:/home/toor/V2L/yocto_rzboard/poky/bitbake/bin:/home/toor/V2L/yocto_rzboard/build/tmp/hosttools"; export HOME="/home/toor"; /usr/bin/env wget -t 2 -T 30 --passive-ftp --no-check-certificate -O /home/toor/V2L/yoctoは_rzboard/build/downloads/git2_github.com.intel.bmap-tools.tar.gz.tmp -P /home/toor/V2L/yocto_rzboard/build/downloads 'https://mirrors.kernel.org/yocto-sources/gitshallow_github.com.intel.bmap-tools_db7087b-1_master.tar.gz/git2_github.com.intel.bmap-tools.tar.gz' --progress=dot -v failed with exit code 8, no output
ERROR: Fetcher failure: Unable to find revision db7087b883bf52cbff063ad17a41cc1cbb85104d in branch master even from upstream
ERROR: Bitbake Fetcher Error: FetchError('Unable to fetch URL from any source.', 'git://github.com/intel/bmap-tools;branch=master;protocol=https')
DEBUG: Python function base_do_fetch finished
DEBUG: Python function do_fetch finished

bmap-tools-native/3.5は間違いなく存在します。何かの都合でコミットID (SHA1ハッシュタグ)が不一致になってしまったのでしょう。
image.png
image.png

bmap-tools_3.5.bb
HOMEPAGE = "https://github.com/01org/bmap-tools"
SECTION = "console/utils"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"

SRC_URI = "git://github.com/intel/${BPN};branch=main;protocol=https"

SRCREV = "db7087b883bf52cbff063ad17a41cc1cbb85104d"
S = "${WORKDIR}/git"
PV .= "+git${SRCPV}"

UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"

このような場合、適切なコミットIDを確認し*.bbのSRCREV記述を修正することが王道のように思われます。

手抜きをする

ここでは特定のRevisionの指示である必要はなく、ホストPC側コマンドのレシピということもあり最新版の指示であれば十分です。AUTOREVを指定してしまいましょう。
LICENSE = "CLOSED"を指定することで、LIC_FILES_CHKSUMの指定は意味を持たなくなります。

LICENSE = "CLOSED"
LIC_FILES_CHKSUM = ""

SRC_URI = "git://github.com/intel/${BPN};branch=main;protocol=https"

SRCREV = "${AUTOREV}"

(追記)ビルドのやり直し

失敗していたyoctoビルドの途中からやり直す際、キャッシュが悪さしてしまう場合はcleansstateしてみましょう。

$ bitbake -c cleansstate bmap-tools-native bmap-tools

これでbitbake成功したので、めでたしめでたし?

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?