我有3包A,B和C. C取决于B,B取决于A.我已经创build了这3个包的回购。 当我运行yum install C时,首先安装B,然后是A,然后是C.如何确保它在安装包B之前安装包A?
您必须在.rpm包的spec文件中正确指定依赖关系。 Rpm将设法自动安装所有必需的软件包。
.spec文件的例子可能是:
# # Example spec file # Summary: PACKAGE C Name: PACKAGE C Version: 1.0 Release: 1 Copyright: GPL Group: Applications/Sound Requires: PACKAGE B >= 1.0.0 Source: URL URL: URL Distribution: Linux Vendor: Software, Inc. Packager: Santa Claus <[email protected]> %description SOME DESCRIPTION HERE!
看看需要部分(或BuildRequires,如果你正在编译你的软件包)
另一方面,在stackoverflow另一个职位,可以为你有用: https : //stackoverflow.com/questions/11418814/where-does-rpm-look-for-dependencies
了解rpm包的创build过程的另一个好资源: https : //fedoraproject.org/wiki/How_to_create_a_GNU_Hello_RPM_package
问候