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:06:53 CEST
Message-id: <A076F5DB-5B96-47DA-8CEB-3430DB3468B7@mac.com>

On Jul 12, 2010, at 1:53 AM, Oguz Yilmaz wrote:

> Hi all,
> 
> I am on a task for packaging a kernel module.
> kernel-xx.rpm has already e1000e.ko module in it.
> 
> I will make a new rpm with e1000e.ko with the same path.
> 
> What do you suggest for installing new rpm without conflicts and
> force? There may be some hacks in my mind:
> For example:
> Adding e1000e.ko file with another path in the rpm and use postinstall
> script to replace old file.
> 

Using %post is one way. The usual failure point with %post is
that the effect of replacing a file in another package
doesn't survive an upgrade. i Then a %trigger* script is needed.

But for replacing e1000e.ko a %post will "work", kernel packages
are never upgraded.

See also the "Dell Kernel Module System" (DKMS if I've remembered
the name). DKMS is an orderly way to add a 3rd party driver to
an existing kernel package, including rebuilding when the kernel
is replaced.

> However, if exists and if possible, I want to use most standard way of
> doing this.
> 

There is no 1 standard way to replace a file in another package using RPM.

hth

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