我配置一个spec文件来构建需要其基础包的RPM文件。 第一个规格RPM配置:
%global _installDir /opt
%global _name ovcore
%global _build 1
%global _version 1.2.1.R01
%global _release 1
Summary: First RPM Version
Name: %{_name}
Version: %{_version}.%{_build}
Release: %{_release}
License: Free.
Group: OV
URL: http://free-core.vn
BuildRoot: %{_tmppath}/%{_name}
Provides: %{_name} = %{version}-%{release}
然后我在构建第二个时更新了我的SPEC:
%global _installDir /opt
%global _name ovcore
%global _build 10
%global _version 1.2.1.R01
%global _release 1
Summary: Second RPM Version
Name: %{_name}
Version: %{_version}.%{_build}
Release: %{_release}
License: Free.
Group: OV
URL: http://free-core.vn
BuildRoot: %{_tmppath}/%{_name}
Provides: %{_name} = %{version}-%{release}
Requires: %{_name} = 1.2.1.R01.1-1
在我的CentOS(7)客户端中,我在安装第二个rpm文件时遇到此错误执行此命令:
[root@localhost ~]# yum install --debuglevel=10 --rpmverbosity=10 ovcore
install ovcore
Loading "fastestmirror" plugin
Config time: 0.007
Yum version: 3.4.3
rpmdb time: 0.000
Setting up Package Sacks
local | 2.9 kB 00:00:00
local/x86_64/primary_db | 1.9 kB 00:00:00
Determining fastest mirrors
pkgsack time: 0.058
Checking for virtual provide or file-provide for install
No package install available.
Obs Init time: 0.000
Resolving Dependencies
--> Running transaction check
---> Package ovcore.x86_64 0:1.2.1.R01.10-1 will be installed
Checking deps for ovcore.x86_64 0:1.2.1.R01.10-1 - u
looking for ('ovcore', 'EQ', ('0', '1.2.1.R01.1', '1')) as a requirement of ovcore.x86_64 0:1.2.1.R01.10-1 - u
looking for ('/bin/sh', None, (None, None, None)) as a requirement of ovcore.x86_64 0:1.2.1.R01.10-1 - u
looking for ('/bin/sh', None, (None, None, None)) as a requirement of ovcore.x86_64 0:1.2.1.R01.10-1 - u
ovcore-1.2.1.R01.10-1.x86_64 requires: ovcore = 1.2.1.R01.1-1
--> Processing Dependency: ovcore = 1.2.1.R01.1-1 for package: ovcore-1.2.1.R01.10-1.x86_64
Searching pkgSack for dep: ovcore
Potential resolving package ovcore-1.2.1.R01.1-1.x86_64 has newer instance in ts.
--> Finished Dependency Resolution
Dependency Process ending
Depsolve time: 0.385
Error: Package: ovcore-1.2.1.R01.10-1.x86_64 (local)
Requires: ovcore = 1.2.1.R01.1-1
Available: ovcore-1.2.1.R01.1-1.x86_64 (local)
ovcore = 1.2.1.R01.1-1
ovcore = 1.2.1.R01-1
Installing: ovcore-1.2.1.R01.10-1.x86_64 (local)
ovcore = 1.2.1.R01.10-1
ovcore = 1.2.1.R01-1
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
[root@localhost ~]#
这里的主要想法是:
如果有人在他们的系统上安装了我的RPM文件。稍后如果我的程序有错误,那么我需要创建一个补丁来修复它(这个补丁应该只针对1个构建目标)。这意味着,我需要创建补丁RPM文件以上传到存储库。 然后,在客户端PC中,他们可以执行" yum update ovcore"应用我的补丁修复程序。
感谢任何帮助!
答案 0 :(得分:0)
1.2.1.R01.10-1
(安装版本)!= 1.2.1.R01.1-1
(在第二个规范中明确要求)。你为什么说它需要一个旧版本呢?
其他misc注意事项:
_
开头,因为您可能会意外地踩踏内部变量。