Hi Martin,
Sorry the delay, coming back from PTO and holidays.
On Thu, Dec 13, 2018 at 02:50:22PM -0800, Martin Xu wrote:
> Hi Flavio,
>
> I remember when we had a discussion about package "succession" when I had
> the "Obsoletes" tag added in one of the previous patches submitted for the
> fedora spec files.
>
> We do need the capability for the system to know openvswitch-kmod is
> automatically upgrading kmod-openvswitch. For some reason, I thought I
> tested "Provides" alone would suffice. I just tried again and it seems not
> the case. "Provides" does not make the renamed package automatically
> upgrade the older one. Is there any other ways of doing this? I found one
> suggestion from the fedora site, that uses both "Provides" and "Obsoletes."
> I understand this means we will be declaring openvswitch-kmod is being
> replaced. We can't go either way anymore. Is there a better solution?
> Thanks.
Provides does not allow upgrades. It will satisfy dependencies on what
you are providing. A common example is smtp: sendmail and postfix. Both
could do: "Provides: smtp", then "mutt" could do "Requires: smtp" and
either sendmail or postfix would be fine.
You're right that you need Obsoletes to allow upgrades. The problem
with Obsoletes is that once you ship it, there is no turning back.
That's why I suggested to limit to a specific version.
For example:
Obsoletes: kmod-openvswitch < %{version}-%{release}
That grants all previous packages are indeed obsoleted while it
would be possible to resurrect kmod-openvswitch if we change our minds
in the future. All we would need is to ship kmod-openvswitch newer
than the last %{version}-%{release} shipped.
HTH,
fbl
>
> Martin
>
> On Thu, Dec 13, 2018 at 2:44 PM Martin Xu <[email protected]> wrote:
>
> > This patch removes the "Conflicts" tag and adds "Obsoletes" tag.
> >
> > With the conflicts tag, when a user attempts to install or upgrade with
> > the same version as already installed, the conflict kicks in. Otherwise,
> > such is allowed with --replacepkgs.
> >
> > Obsoletes is needed for the upgrade path from kmod-openvswitch to
> > openvswitch-kmod.
> >
> > Fixes: 22c33c3039 (rhel: support kmod build against mulitple kernel
> > versions, fedora)
> >
> > VMware-BZ: #2249788
> >
> > Signed-off-by: Martin Xu <[email protected]>
> > CC: Flavio Leitner <[email protected]>
> > CC: Yi-Hung Wei <[email protected]>
> > CC: Yifeng Sun <[email protected]>
> > CC: Zak Whittington <[email protected]>
> > CC: Ben Pfaff <[email protected]>
> > ---
> > v1->v2: adds "Obsoletes" tag needed for upgrade after renaming
> > adds more reviewers
> >
> > rhel/openvswitch-kmod-fedora.spec.in | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/
> > openvswitch-kmod-fedora.spec.in
> > index 8d54fd734..7913dbdb4 100644
> > --- a/rhel/openvswitch-kmod-fedora.spec.in
> > +++ b/rhel/openvswitch-kmod-fedora.spec.in
> > @@ -33,7 +33,7 @@ Source: openvswitch-%{version}.tar.gz
> > #Source1: openvswitch-init
> > Buildroot: /tmp/openvswitch-xen-rpm
> > Provides: kmod-openvswitch
> > -Conflicts: kmod-openvswitch
> > +Obsoletes: kmod-openvswitch
> >
> > %description
> > Open vSwitch provides standard network bridging functions augmented with
> > --
> > 2.12.3
> >
> >
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
--
Flavio
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev