2012-04-20 5 views
0

私は唯一specfiedファイルを置き換えますと構造がrpm Uオプションを使用しますか?

rpm -qlp CDA-4.2.1-201203020211.i386.rpm 
/opt/CDA/agent/bin/agent_client 
/opt/CDA/agent/bin/Agent 
/opt/CDA/agent/bin/cda_agent 
/opt/CDA/agent/conf/agent.conf 
/opt/CDA/agent/conf/agent.ini 


rpm -qlp CDA-4.2.1.1-201203020211.i386.rpm 
/opt/CDA/agent/bin/Agent 




    installed component CDA-4.2.1-201203020211.i386.rpm 
     when i do rpm -U CDA-4.2.1.1-201203020211.i386.rpm 
      all the files get remvoved excpet /opt/CDA/agent/bin/Agent, 
     i'm struggling with the right rpm -U addional options, 
     i want only /opt/CDA/agent/bin/Agent to be replaced 

を変更しないことを私はパッケージのすべての古いバージョンを消去を防止する必要がある、とだけ交換し、このように、私のインストールコンポーネントをアップグレードしたいです新しいファイルが存在する

答えて

1

新しいrpmには、更新するファイルだけでなく、すべてのファイルが含まれている必要があります。 %config(noreplace)のようにファイルをリストすると、更新中に置き換えられませんが、インストールされたファイルがX.rpmを変更した場合は更新されたrpmをインストールした後に新しいファイルが作成されます。つまり、あなたのCDA.specは次のようになります:

... 
%files 
... 
%config(noreplace) /opt/CDA/agent/conf/agent.ini # similar for other config files 
... 
+0

ありがとうございました。ファイルには(noreplace)を適用することはできますか – anish

関連する問題