Centos5
處理從需要 mod_python 的 pkg-xyrpm 到 pkg-x.(y+z).rpm 的 yum 升級與 mod_python 衝突
在 RHEL 5 上使用 yum/rpm 可以
yum upgrade
刪除另一個有衝突的軟體包 - 類似於apt-get dist-upgrade
Debian 上的行為?我正在為我們產品的 rpm 更新 .spec。4.2.x 版本使用了 mod_python,所以規範包含
Requires: mod_python
4.3.x 版本在守護程序模式下使用 mod_wsgi,因此與同時載入 mod_python 不兼容(在 RHEL 5.x 中打包)。為了確保 mod_python 沒有在 4.3.x 版本中載入,我們嘗試使用
Conflicts: mod_python
我希望這能讓 yum 意識到它可以在升級時刪除 mod_python,但它拒絕了,我無法找到配置/指示 yum 的方法
[root@server ~]# yum upgrade define Loaded plugins: downloadonly, rhnplugin, security Skipping security plugin, no data Setting up Upgrade Process Resolving Dependencies Skipping security plugin, no data --> Running transaction check ---> Package define.x86_64 0:4.3.14-1 set to be updated --> Processing Dependency: shibboleth for package: define --> Running transaction check ---> Package shibboleth.x86_64 0:2.4.3-2.2.el5 set to be updated --> Processing Dependency: opensaml-schemas for package: shibboleth --> Processing Dependency: xmltooling-schemas for package: shibboleth --> Processing Dependency: libxmltooling-lite.so.5()(64bit) for package: shibboleth --> Processing Dependency: libxerces-c-3.1.so()(64bit) for package: shibboleth --> Processing Dependency: libsaml.so.7()(64bit) for package: shibboleth --> Processing Dependency: liblog4shib.so.1()(64bit) for package: shibboleth --> Processing Dependency: libodbc.so.1()(64bit) for package: shibboleth --> Processing Dependency: libxml-security-c.so.16()(64bit) for package: shibboleth --> Processing Dependency: libxmltooling.so.5()(64bit) for package: shibboleth --> Running transaction check ---> Package libsaml7.x86_64 0:2.4.3-3.2.el5 set to be updated ---> Package libxerces-c-3_1.x86_64 0:3.1.1-2.2.el5 set to be updated ---> Package libxml-security-c16.x86_64 0:1.6.1-3.1.el5 set to be updated ---> Package libxmltooling5.x86_64 0:1.4.2-2.1.el5 set to be updated ---> Package log4shib.x86_64 0:1.0.3-2.1 set to be updated ---> Package opensaml-schemas.x86_64 0:2.4.3-3.2.el5 set to be updated ---> Package unixODBC-libs.x86_64 0:2.2.11-10.el5 set to be updated ---> Package xmltooling-schemas.x86_64 0:1.4.2-2.1.el5 set to be updated --> Processing Conflict: define conflicts mod_python --> Finished Dependency Resolution define-4.3.14-1.x86_64 from define-development has depsolving problems --> define conflicts with mod_python Error: define conflicts with mod_python You could try using --skip-broken to work around the problem You could try running: package-cleanup --problems package-cleanup --dupes rpm -Va --nofiles --nodigest
目前我正在使用
yum remove define; yum remove mod_python; yum install define
作為一種解決方法。有沒有更好的方法來用 yum/rpm 處理這個(升級 foo 觸發刪除 bar)?或者答案是“這是你不應該在 RHEL 上做的事情,所以不要這樣做”?
我不認為 yum 可以做到這一點。擺脫衝突的唯一方法是讓系統做好準備以避免衝突。外掛可能會修改 yum 的行為並建議刪除包以解決衝突,但我不知道。