将补丁应用到buildroot目录之外的软件包 [英] Applying patch to a package outside of buildroot directory

查看:229
本文介绍了将补丁应用到buildroot目录之外的软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将补丁应用到不在buildroot/package内但在其他地方的软件包.

I am trying to apply a patch to a package that is not located within buildroot/package but elsewhere.

我已将以下内容添加到我的buildroot .config中

I have added to my buildroot .config the following

BR2_GLOBAL_PATCH_DIR="absolute/path/to/folder"

该文件夹是正确的,因为如果路径不正确,buildroot将会出错.因此目录的路径很好.

The folder is correct because if the path wasn't correct, buildroot would error out. So the path to the directory is good.

使用此处

Using the instructions here and here. I've added a subdirectory with the name that matches the package and adding the patch to that subdirectory but nothing happens.

Buildroot从不输出它正在尝试应用补丁程序,这使我相信buildroot甚至没有查看BR2_GLOBAL_PATCH_DIR或在buildroot/support/scripts/中调用apply-patches.sh.

Buildroot never outputs it's trying to apply patches which leads me to believe buildroot isn't even looking in the BR2_GLOBAL_PATCH_DIR or calling the apply-patches.sh in buildroot/support/scripts/.

为什么buildroot不尝试将补丁应用到我的软件包?

Why isn't buildroot trying to apply the patch to my package?

推荐答案

Buildroot仅将补丁应用于具有已下载源代码的软件包.换句话说,它不会将修补程序应用于使用FOO_SITE_METHOD = localFOO_OVERRIDE_SRCDIR = /path/to/foo本地获取的软件包.

Buildroot applies patches only to packages with downloaded source code. In other words, it doesn't apply patches to packages that are taken locally with FOO_SITE_METHOD = local or with FOO_OVERRIDE_SRCDIR = /path/to/foo.

如果您看到这样的输出:

If you see output like this:

>>> foo custom Syncing from source dir /path/to/foo

您处于这种情况.

-编辑-

在这种情况下,Buildroot不支持应用补丁.但是,您可以使用以下方法解决此问题:

Applying patches in this case is not supported by Buildroot. However, you can work around it with something like this:

define FOO_APPLY_PATCHES
        $(APPLY_PATCHES) $(@D) $(addsuffix /$(RAWNAME),$(call qstrip,$(BR2_GLOBAL_PATCH_DIR))) \*.patch
endef
FOO_POST_RSYNC_HOOKS += FOO_APPLY_PATCHES

这篇关于将补丁应用到buildroot目录之外的软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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