如何使用“buildhistory"在 yocto 构建系统中? [英] how to use "buildhistory" in yocto build system?

查看:31
本文介绍了如何使用“buildhistory"在 yocto 构建系统中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想跟踪使用 yocto-build-system 创建的构建".经过一番搜索,了解到yocto-project提供的buildhistory"功能.

他们说,要启用构建历史",我们需要执行以下操作:

编辑.../build/conf/local.conf并添加:

INHERIT += "buildhistory"BUILDHISTORY_COMMIT = "1"

然后重新运行bitbake"以初始化 buildhistory 目录.

我做了同样的事情,但我无法找到 buildhistory 目录.

谁能告诉我,如何使用这个构建历史",以及如何查看构建差异?

解决方案

它将在 ${TOPDIR} 中创建 buildhistory 目录,该目录指向您的构建目录.除非您指定了其他内容,否则构建目录通常为 build.

您可以自己进入 buildhistory 目录,并使用 git (gitk, ti​​g),尽管通常留在 ${TOPDIR} 中并运行更方便,例如

buildhistory-diff

您是否检查过文档:http://www.yoctoproject.org/docs/1.6/ref-manual/ref-manual.html#maintaining-build-output-quality?

当您启用 buildhistory 时,您将在 buildhistory 目录中获得几个目录images"和packages"以及一个文件 metadata-revs.(并且还应该有 .git 目录).在这些目录中,buildhistory 将通过在每个 bitbake 命令之后将它们提交到它的存储库来保留所有更改.除其他外,包版本和版本、安装在图像中的包、大小等都被跟踪.这一切都在文档链接中进行了概述.

尝试将 IMAGE_INSTALL_append="some-package" 添加到您的 local.conf,并在对您的图像进行位烘焙后运行 buildhistory-diff.这应该告诉您一个包已添加到图像中.

您也可以进入 buildhistory 目录并在那里运行 git loggitktig 以检查提交的内容.

如果您仍然没有得到任何输出,请将 buildhistory 目录的树结构粘贴到 pastebin.

I wanted to keep track of the "builds" that gets created using the yocto-build-system. And after doing some search, came to know about "buildhistory" feature provided by yocto-project.

They say, for enabling the "buildhistory", we need to do following:

Edit .../build/conf/local.conf and add:

INHERIT += "buildhistory"
BUILDHISTORY_COMMIT = "1"

and then rerun the "bitbake" for initializing the buildhistory directory.

I did the same, but I am unable to locate the buildhistory directory as such.

Can anybody let me know, how to use this "buildhistory", and how to see the build-differences?

解决方案

It'll create the buildhistory directory in ${TOPDIR}, which points to your build directory. The build directory is normally build, unless you've specified something else.

You can go into the buildhistory directory yourself, and use git (gitk, tig), though it's usually a lot more convenient to stay in ${TOPDIR} and run e.g.

buildhistory-diff

Have you checked the documentation: http://www.yoctoproject.org/docs/1.6/ref-manual/ref-manual.html#maintaining-build-output-quality?

When you enable buildhistory, you'll get a couple of directories "images" and "packages" along with a file metadata-revs in your buildhistory directory. (And there should also be .git directory). In these directories, buildhistory will keep all changes by committing them to it's repository after each bitbake command. Amongst other things, package version & revisions, packages installed in images, sizes, etc are all kept track of. This is all outlined in the doc link.

Try adding IMAGE_INSTALL_append="some-package" to your local.conf, and run buildhistory-diff after bitbakeing your image. This should tell you that a package was added to the image.

You could also go into the buildhistory directory and run git log, gitk, or tigthere to check out whats commited.

If you're still not getting any output, paste the tree structure of the buildhistory directory to pastebin.

这篇关于如何使用“buildhistory"在 yocto 构建系统中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆