yum update不会将依赖关系更新为所需的最小版本

时间:2014-05-21 14:36:42

标签: rpm yum

我们有两个RPM套件,都是内部开发的:

  • wm-billing-scrooge和
  • WM-登录托运人

wm-billing-scrooge 需要 wm-log-shipper

require: wm-log-shipper (in *wm-billing-scrooge* spec file)

现在我们修复了 wm-log-shipper 中的问题,并希望确保每当我们在计算机上更新 wm-billing-scrooge 时,我们也会更新< em> wm-log-shipper 至少要求的版本。因此,我们将 require 子句更改为

require: wm-log-shipper >= 4.50.0

现在,我的期望是每当我做

yum update wm-billing-scrooge

在安装了 wm-log-shipper 旧版( wm-log-shipper

的计算机上

  • 认识到要安装的 wm-billing-scrooge 版本取决于比安装的 wm-log更新的 wm-log-shipper 版本-shipper 版本和
  • 还会更新 wm-log-shipper

这种期望是否正确?

如果这个期望是正确的,那么在我们的情况下 yum 无法升级 wm-log-shipper 的原因可能是什么?

这是一个有希望说明问题的shell会话:

devwulf-smsplus-billing1:~# yum list installed wm-log-shipper
Loaded plugins: security
office-wm-software-development                                                                                                                                                           | 2.7 kB     00:00     
office-wm-software-development/primary_db                                                                                                                                                | 890 kB     00:00     
wm-software                                                                                                                                                                              | 2.7 kB     00:00     
wm-software/primary_db                                                                                                                                                                   | 890 kB     00:00     
Installed Packages
wm-log-shipper.x86_64                                                       4.46.0-INTEGRATION_S46_SNAPSHOT20140128084356                                                        @office-wm-software-development
devwulf-smsplus-billing1:~# repoquery --requires wm-billing-scrooge
/bin/sh
jpackage-utils
runtime-env-init-functions
wm-log-shipper >= 4.50.0
devwulf-smsplus-billing1:~# yum list installed wm-log-shipper
Loaded plugins: security
office-wm-software-development                                                                                                                                                           | 2.7 kB     00:00     
wm-software                                                                                                                                                                              | 2.7 kB     00:00     
Installed Packages
wm-log-shipper.x86_64                                                       4.46.0-INTEGRATION_S46_SNAPSHOT20140128084356                                                        @office-wm-software-development
devwulf-smsplus-billing1:~# rpmdev-vercmp 4.50.0 4.46.0-INTEGRATION_S46_SNAPSHOT20140128084356
0:4.50.0-None is newer
devwulf-smsplus-billing1:~# yum update -d 10 wm-billing-scrooge
Loading "security" plugin
Running "config" handler for "security" plugin
Config time: 0.037
Yum Version: 3.2.29
COMMAND: yum update -d 10 wm-billing-scrooge 
Installroot: /
Ext Commands:

   wm-billing-scrooge
Setting up Package Sacks
office-wm-software-development
wm-software                                                                                                                                                                              | 2.7 kB     00:00     
Running "exclude" handler for "security" plugin
pkgsack time: 0.340
Reading Local RPMDB
rpmdb time: 0.001
Setting up Update Process
Building updates object
up:Obs Init time: 0.263
putting perl-version in simple update
....
processing nss-util
up:simple updates time: 0.033
up:obs time: 0.005
up:condense time: 0.000
updates time: 0.632
Not Updating Package that is already updated: wm-billing-scrooge.x86_64 0:4.54.0-SNAPSHOT20140519150818
Not Updating Package that is already updated: wm-billing-scrooge.x86_64 0:4.54.0-SNAPSHOT20140519150818
Resolving Dependencies
Running "preresolve" handler for "security" plugin
--> Running transaction check
---> Package wm-billing-scrooge.x86_64 0:4.54.0-SNAPSHOT20140519150818 will be updated
Checking deps for wm-billing-scrooge.x86_64 0:4.54.0-SNAPSHOT20140519150818 - ud
---> Package wm-billing-scrooge.x86_64 0:4.54.0-SNAPSHOT20140521105707 will be an update
Checking deps for wm-billing-scrooge.x86_64 0:4.54.0-SNAPSHOT20140521105707 - u
looking for ('wm-log-shipper', 'GE', ('0', '4.50.0', None)) as a requirement of wm-billing-scrooge.x86_64 0:4.54.0-SNAPSHOT20140521105707 - u
--> Finished Dependency Resolution
Dependency Process ending
Depsolve time: 0.815

Dependencies Resolved

================================================================================================================================================================================================================
 Package                                        Arch                               Version                                                     Repository                                                  Size
================================================================================================================================================================================================================
Updating:
 wm-billing-scrooge                             x86_64                             4.54.0-SNAPSHOT20140521105707                               office-wm-software-development                              21 M

Transaction Summary
================================================================================================================================================================================================================
Upgrade       1 Package(s)

Total download size: 21 M
Is this ok [y/N]: N
Exiting on user Command
devwulf-smsplus-billing1:~#

有什么想法吗?

Thx,Olaf

1 个答案:

答案 0 :(得分:1)

require: wm-log-shipper >= 4.50.0

错了。

应该是:

Requires: wm-log-shipper >= 4.50.0

根据您运行的rpmbuild版本,可能需要以下内容:

AutoReq:        no

较新版本的rpmbuild会自动计算需求。 在没有“Autoreq:no”标志的情况下运行时,您应该注意rpmbuild输出中rpm的要求是什么。然后手动将它们添加到“Required:”标志。