Re: Distributing a partially-compatible variant package?

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


On Mon, 2014-09-22 at 15:14 +0800, Craig Ringer wrote:
> Hi all
> I have a somewhat odd requirement that I'm finding it hard to fit into
> RPM's framework.
> TL;DR: I need to release a variant of a package that's compatible with
> extensions compiled for it as shared libraries, with its client library,
> and with its network protocol - but *isn't* compatible with the on disk
> file format it uses. How do you handle such partial compatibility?
> That means I have to use the same binary paths, etc, so my packages will
> conflict with the stock ones.

 Conflicting with the stock ones is fine, conflicting with yourself
doesn't help anyone.

> What I've done is produced packages with a new name based on the "bdr"
> variant I need to package, like:
> Name:      postgresql-bdr94
> Version:   9.4beta2_bdr1
> Release:   1_2ndQuadrant
> Provides:  postgresql94%{?isa}
> Conflicts: postgresql94%{?isa}

 What I think you want to do here is:

Provides:  postgresql94%{?isa} = %{version}-%{release}
Conflicts: postgresql94%{?isa} != %{version}-%{release}

...the above is kind of a bad/confusing shortcut for that.

> that Provides the package I seek to replace, but also Conflicts with it.
> Without the Provides entry packages of extensions etc will refuse to
> install. Without the Conflicts entry yum will try to install
> postgresql-bdr94 side-by-side with postgresql94 then rpm will abort the
> install when it finds out that they share most of the same file locations.
> I can't use Obsoletes, or use Provides without Conflicts, because the
> new package isn't totally compatible with the old one and it'd be a
> nasty surprise to users if the new package suddenly replaced the old one
> when they added my repo, but didn't support their existing databases.
> However, it looks like rpm doesn't ignore Conflicts entries that are
> conflicts-with-self. So after installation, yum complains:
> ** Found 6 pre-existing rpmdb problem(s), 'yum check' output follows:
> ...
> postgresql-bdr94-9.4beta2-bdr0.7.1_1_2ndQuadrant.fc20.x86_64 has
> installed conflicts postgresql94(x86-64): postgresql-bdr94-9.4beta2
> ...

 Note that this error is just the "yum check" code, so you _can_ ignore
it if you really want to use self conflicts as it'll only run if you use
rpm directly (very bad), something goes wrong when yum tries to run a
transaction (even worse) or the user runs it manually.
 The depsolving code in yum handles self conflicts fine, and I've just
pushed a fix for the "yum check" code.

Rpm-list mailing list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux