gpt4 book ai didi

RPM 规范 - 如何允许多个版本

转载 作者:行者123 更新时间:2023-12-04 23:18:12 30 4
gpt4 key购买 nike

以内核 rpm 为例,它允许在一个系统上同时安装多个版本。规范文件中究竟是什么允许的?

我想打包一个已经存在的具有不同安装前缀的多个版本的项目。

最佳答案

百胜

找到了让 yum 安装而不是更新的方法。有一个配置指令可以这样做。来自 man yum.conf:

installonlypkgs

List of package provides that should only ever be installed, never updated. Kernels in particular fall into this category. Defaults to kernel, kernel-bigmem, kernel-enterprise, kernel-smp, kernel-debug, kernel-unsupported, kernel-source, kernel-devel, kernel-PAE, kernel-PAE-debug.

Note that because these are provides, and not just package names, kernel-devel will also apply to kernel-debug-devel, etc.

Note that "kernel-modules" is not in this list, in RHEL-6, and so anything providing that is updated like any other package.



installonly_limit

Number of packages listed in installonlypkgs to keep installed at the same time. Setting to 0 disables this feature. Default is '3'. Note that this functionality used to be in the "installonlyn" plugin, where this option was altered via tokeep. Note that as of version 3.2.24, yum will now look in the yumdb for a installonly attribute on installed packages. If that attribute is "keep", then they will never be removed.



测试并确认它复制了内核的行为。更新或安装时,yum 不会更新(删除)旧包。

注意列表中的包名必须准确,不考虑通配符。所以有一种方法可以做到这一点,并且可能会在 rpm 的 中自动化该过程。 %post 脚本。

关于RPM 规范 - 如何允许多个版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34683225/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com