RPM Community Forums

Mailing List Message of <rpm-users>

Re: Replacing a file already owned by another rpm package

From: Jeff Johnson <n3npq@mac.com>
Date: Mon 12 Jul 2010 - 14:23:11 CEST
Message-id: <484286A3-FBEF-47F1-A685-3E7386194863@mac.com>

On Jul 12, 2010, at 8:14 AM, Oguz Yilmaz wrote:

> I think %post will not prevent the conflict error, and package will
> not be installed without "--force". However, because I am using yum
> update for my systems, I have to have all packages installing without
> any "--force".

Yes there will be a file conflict (which is different than a
package Conflicts: assertion) when a package install is attempted
and some other package has different content on the identical path.

Rename the e1000e.ko in your package, and use %post to copy
to the final path.

> If the is not a legal method for replacing a file of another rpm, I
> will add a postinstall script while adding the file with another path;
> and move the file to the original location in postinstall script.

The is *NO* supported means in RPM to replace a file in another
package. RPM is a package, not a file, manager is the deep reason.

The correct/supported RPM packaging solution is to patch the kernel
package however you wish and replace the entire kernel package.

But %post or %trigger or DKMS or alternatives(1) are all means that will "work:

73 de Jeff
Received on Mon Jul 12 14:24:05 2010
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.