如何定义“取决于”?对于正在运行的内核

发布于 2024-09-29 02:29:59 字数 160 浏览 14 评论 0原文

软件包 A 依赖于软件包 B-kmod,并且 B-kmod 有多个变体。像 B-kmod--{generic,pae-generic} 等,而 B-kmod 又依赖于相同风格的 linux-image。

我希望 A 依赖于 B-kmod-$(uname -r)。如何在控制文件中表达这一点?

package A depends on package B-kmod and B-kmod has several variants. like B-kmod--{generic,pae-generic} etc. and in turn B-kmod depends on linux-image of the same flavor.

i'd like A to have depends on B-kmod-$(uname -r). how to express this in control file?

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

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

发布评论

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

评论(1

北渚 2024-10-06 02:29:59

如果您的意思是希望 A 依赖于正在安装的内核模块,该模块与安装 A 时运行的内核版本相匹配,那绝对是不可能的。作为替代方案,最好的选择是在安装前或安装后脚本期间检查所需功能的可用性,如果不存在则安装失败。您必须记住:

  • 即使未安装 B-kmod 的软件包,它们也可能具有 B-kmod 提供的功能
    • 他们可能在没有使用软件包的情况下安装了它
    • 它们可能在 chroot 中运行,无法看到正在运行的内核的软件包
  • 他们可能在安装 A 后重新启动到另一个内核。因此,A 在这种情况下应该正常降级。

If you mean that you want A to depend on a kernel module being installed matching the kernel version of the kernel running at the time that A is installed, that is definitely impossible. Your best bet as an alternative is to check for the availability of the features you require during the preinst or postinst scripts and fail the install if they are not present. You must keep in mind that:

  • They might have the functionality provided by B-kmod even if a package by that name isn't installed
    • they might have installed it without using a package
    • they might be running inside a chroot where they cannot see the packages for the running kernel
  • They might reboot into another kernel after installing A. So A should gracefully degrade in that situation.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文