P2 无头更新不起作用

发布于 2024-08-10 20:55:01 字数 1069 浏览 6 评论 0原文

我已经采用了 org.eclipse.equinox.p2.examples.rcp.prestartupdate 项目并对其进行了调整,以便在我的 RCP 应用程序中使用。然后,我设置一个更新存储库,该存储库作为我夜间构建的一部分进行更新。

当我打开我的应用程序时,它会像正在更新一样进行操作 - 它找到更新站点,正确地为每个包生成卸载和安装操作数,并表示它已完成且没有错误。问题是,即使配置文件已更新(后续运行表明没有更新),插件也从未真正安装在插件文件夹中。下次我的构建运行时,它会正确识别有更新,但同样的事情再次发生。

我花了几天时间进行调试,唯一看起来不寻常的事情(并不是我完全理解发生了什么)是在最后的配置阶段,没有一个 TouchpointData 对象有任何指令,所以它看起来不像配置是做它应该做的事。

我真的不知道接下来该去哪里,想看看其他人是否有任何想法。

更新:

我终于弄清楚发生了什么事。

当我在没有生成元数据存储库的情况下构建产品时,问题就开始了。通过 Eclipse 构建时,我没有在导出产品向导中选中“生成元数据存储库”,因为我不需要 p2 存储库,只需要产品。问题是,如果不检查该按钮,产品就不会在启用 P2 时安装,从而导致副作用,例如不生成配置文件等。

我试图通过在代码中手动创建配置文件来弥补这一点,但后来我发现这是一个非常糟糕的主意。我最初的问题是因为我的个人资料设置不正确而产生的。

一旦我开始使用“生成元数据存储库”导出产品,检查更新就开始正确安装新插件。

我现在遇到的问题是,虽然插件安装正确,但可执行文件被丢弃,我无法再启动我的应用程序。我正在通过 Hudson 构建更新站点,并且使用 Eclipse 导出产品向导时出现的二进制文件夹丢失。我想这就是现在出了问题的地方。

有什么想法为什么二进制文件不会在我的无头 PDE 构建中构建吗?

也想通了这一点。我假设我所需要的只是我想要构建的平台的单独启动器插件。因为我试图理解这个过程,所以我将插件一一复制到构建服务器。事实证明,在构建中包含特定于平台的二进制文件,您需要从增量包中获得 org.eclipse.equinox.executable 功能。一旦我将其添加到构建中,二进制文件就开始出现在输出中。对于二进制文件,更新机制完全按照预期工作。

I have taken the org.eclipse.equinox.p2.examples.rcp.prestartupdate project and adapted it for use in my RCP application. I then setup an update repository that gets updated as part of my nightly build.

When I open my application it goes through the motions like it is updating - it finds the update site, generates an uninstall and install operand for each bundle correctly and says that it finished with no errors. The problem is that the plugins never actually get installed in the plugins folder even though the profile gets updated (a subsequent run states there are no updates). Next time my build runs it correctly identifies there are updates, but the same thing happens again.

I have spent days debugging and the only thing that looks out of the ordinary (not that I fully understand what is going on) is that during the final configure phase none of the TouchpointData objects have any instructions so it doesn't look like configure is doing what it should.

I really have no clue where to look next and would like to see if anyone else has any ideas.

Update:

I finally figured out what was going on.

The problem started when I built my product without the generating the metadata repository. When building through Eclipse I didn't check the "Generate metadata repository" in the export product wizards because I didn't need a p2 repository, just the product. The problem is that without checking that button the product does not install as P2 enabled causing side effects such as not generating a profile among other things.

I tried to compensate for this by manually creating a profile in code which I have since found out is a really bad idea. My original problems were created because my profile wasn't set up correctly.

Once I started exporting the product with "Generate metadata repository" checked the update started correctly installing the new plugins.

The problem I have now is that although the plugins are being installed correctly, the executable is getting trashed and I cannot launch my application any more. I am building my update site through Hudson and the binary folder which is present when I use the Eclipse Export Product wizard is missing. I am assuming that is what is going wrong now.

Any ideas why the binaries would not be building in my headless PDE build?

Figured this out also. I had assumed that all I needed was the individual launcher plugins for the platforms I wanted to build on. Since I was trying to understand the process I was copying over plugins one by one to the build server. It turns out to include the platform specific binaries in the build you need to have the org.eclipse.equinox.executable feature from the delta pack. Once I added that to the build the binaries started showing up in the output. With the binaries the update mechanism works exactly as intended.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蓝咒 2024-08-17 20:55:01

我假设我所需要的只是我想要构建的平台的单独启动器插件。因为我试图理解这个过程,所以我将插件一一复制到构建服务器。事实证明,在构建中包含特定于平台的二进制文件,您需要从增量包中获得 org.eclipse.equinox.executable 功能。一旦我将其添加到构建中,二进制文件就开始出现在输出中。对于二进制文件,更新机制完全按照预期工作。

I had assumed that all I needed was the individual launcher plugins for the platforms I wanted to build on. Since I was trying to understand the process I was copying over plugins one by one to the build server. It turns out to include the platform specific binaries in the build you need to have the org.eclipse.equinox.executable feature from the delta pack. Once I added that to the build the binaries started showing up in the output. With the binaries the update mechanism works exactly as intended.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文