[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: force install of conflicting file



On Thu, Mar 27, 2003 at 02:00:38PM -0500, Aaron Bennett wrote:
> Hello --
> 
> I'm creating a very small package which is an overlay over the 
> freshrpms.net apt package.  All the package needs to do is put down a 
> new /etc/apt/sources.list file over the freshrpms apt package's 
> sources.list.
> 
> I decided to create a new packages, apt-olin, rather then hack the apt 
> package from freshrpms, because it seems more efficient that way.  I 
> realize that I can hack the apt package, replacing Matthias' 
> sources.list with mine, but I'd rather make a different package that can 
> overlay it.
> 
> Anyhow, it works except that installing it produces this error:
> 
> "file /etc/apt/sources.list from install of apt-olin conflicts with file 
> from package apt-0.5.5cnc4.1-fr1"
> 
> Is there a tag I can include in the %file section or somewhere to force 
> rpm to creat an /etc/apt/sources.list.rpmsave instead of dying like that?

Nope, no way to override, basically because there's no way for a
packager to decide what's right to install in general.

Meanwhile, adding --force will Do The Right Thing, basically installing
the file, and marking the previous occurence as state REPLACED to prevent
erasure if apt were to be removed (not likely in this case, but possible
in general).

There's also, new in rpm-4.2, --noconfigs that will prevent installation
of *all* %config marked files.

You might reasonably wonder
	Why would anyone rip out all config files? Wouldn't that
	break the package entirely?

The answrer is
	So that you can replace all the config files in another package.

There's some dependency magic that still needs doing, but --noconfigs in
rpm-4.2 should work for what you are attempting (assuming /etc/apt/sources.list
is marked with %config).

If --noconfigs doesn't work, that's a bug.

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@redhat.com (jbj@jbj.org)
Chapel Hill, NC





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []