diff mbox series

[ovs-dev,v1] rhel: bug fix kmod-openvswitch spec file, rhel6

Message ID 1532847777-11272-1-git-send-email-martinxu9.ovs@gmail.com
State Accepted
Headers show
Series [ovs-dev,v1] rhel: bug fix kmod-openvswitch spec file, rhel6 | expand

Commit Message

Martin Xu July 29, 2018, 7:02 a.m. UTC
Previous patch removed the if condition for postun script by
mistake. The weak-update symlinks should be removed only for
uninstallation not upgrade.

VMware-BZ: #2169383

Signed-off-by: Martin Xu <martinxu9.ovs@gmail.com>
CC: Greg Rose <gvrose8192@gmail.com>
CC: Ben Pfaff <blp@ovn.org>
CC: Flavio Leitner <fbl@redhat.com>
---
 rhel/kmod-openvswitch-rhel6.spec.in | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Comments

Ben Pfaff July 30, 2018, 8:28 p.m. UTC | #1
On Sun, Jul 29, 2018 at 12:02:57AM -0700, Martin Xu wrote:
> Previous patch removed the if condition for postun script by
> mistake. The weak-update symlinks should be removed only for
> uninstallation not upgrade.
> 
> VMware-BZ: #2169383
> 
> Signed-off-by: Martin Xu <martinxu9.ovs@gmail.com>
> CC: Greg Rose <gvrose8192@gmail.com>
> CC: Ben Pfaff <blp@ovn.org>
> CC: Flavio Leitner <fbl@redhat.com>

I looked for the change in the previous patch but it wasn't obvious to
me.  Was this in commit 9207546be025 (rhel: bug fix kmod-openvswitch
spec file, rhel6) or something earlier?
Martin Xu July 30, 2018, 8:34 p.m. UTC | #2
Hi Ben,

I meant to say the previously merged patch. It was 89dd5819cf18 (rhel:
support kmod-openvswitch build against multiple kernels, rhel6). This patch
is meant to fix a bug introduced by 89dd5819cf18.

Martin

On Mon, Jul 30, 2018 at 1:28 PM, Ben Pfaff <blp@ovn.org> wrote:

> On Sun, Jul 29, 2018 at 12:02:57AM -0700, Martin Xu wrote:
> > Previous patch removed the if condition for postun script by
> > mistake. The weak-update symlinks should be removed only for
> > uninstallation not upgrade.
> >
> > VMware-BZ: #2169383
> >
> > Signed-off-by: Martin Xu <martinxu9.ovs@gmail.com>
> > CC: Greg Rose <gvrose8192@gmail.com>
> > CC: Ben Pfaff <blp@ovn.org>
> > CC: Flavio Leitner <fbl@redhat.com>
>
> I looked for the change in the previous patch but it wasn't obvious to
> me.  Was this in commit 9207546be025 (rhel: bug fix kmod-openvswitch
> spec file, rhel6) or something earlier?
>
Ben Pfaff July 30, 2018, 11:17 p.m. UTC | #3
OK, I spent some time staring at 89dd5819cf18 and finally got it.  I
applied this to master and branch-2.10.  I added an appropriate Fixes
tag to the commit.

On Mon, Jul 30, 2018 at 01:34:19PM -0700, Martin Xu wrote:
> Hi Ben,
> 
> I meant to say the previously merged patch. It was 89dd5819cf18 (rhel:
> support kmod-openvswitch build against multiple kernels, rhel6). This patch
> is meant to fix a bug introduced by 89dd5819cf18.
> 
> Martin
> 
> On Mon, Jul 30, 2018 at 1:28 PM, Ben Pfaff <blp@ovn.org> wrote:
> 
> > On Sun, Jul 29, 2018 at 12:02:57AM -0700, Martin Xu wrote:
> > > Previous patch removed the if condition for postun script by
> > > mistake. The weak-update symlinks should be removed only for
> > > uninstallation not upgrade.
> > >
> > > VMware-BZ: #2169383
> > >
> > > Signed-off-by: Martin Xu <martinxu9.ovs@gmail.com>
> > > CC: Greg Rose <gvrose8192@gmail.com>
> > > CC: Ben Pfaff <blp@ovn.org>
> > > CC: Flavio Leitner <fbl@redhat.com>
> >
> > I looked for the change in the previous patch but it wasn't obvious to
> > me.  Was this in commit 9207546be025 (rhel: bug fix kmod-openvswitch
> > spec file, rhel6) or something earlier?
> >
Martin Xu July 30, 2018, 11:25 p.m. UTC | #4
Thanks, Ben!

On Mon, Jul 30, 2018 at 4:17 PM, Ben Pfaff <blp@ovn.org> wrote:

> OK, I spent some time staring at 89dd5819cf18 and finally got it.  I
> applied this to master and branch-2.10.  I added an appropriate Fixes
> tag to the commit.
>
> On Mon, Jul 30, 2018 at 01:34:19PM -0700, Martin Xu wrote:
> > Hi Ben,
> >
> > I meant to say the previously merged patch. It was 89dd5819cf18 (rhel:
> > support kmod-openvswitch build against multiple kernels, rhel6). This
> patch
> > is meant to fix a bug introduced by 89dd5819cf18.
> >
> > Martin
> >
> > On Mon, Jul 30, 2018 at 1:28 PM, Ben Pfaff <blp@ovn.org> wrote:
> >
> > > On Sun, Jul 29, 2018 at 12:02:57AM -0700, Martin Xu wrote:
> > > > Previous patch removed the if condition for postun script by
> > > > mistake. The weak-update symlinks should be removed only for
> > > > uninstallation not upgrade.
> > > >
> > > > VMware-BZ: #2169383
> > > >
> > > > Signed-off-by: Martin Xu <martinxu9.ovs@gmail.com>
> > > > CC: Greg Rose <gvrose8192@gmail.com>
> > > > CC: Ben Pfaff <blp@ovn.org>
> > > > CC: Flavio Leitner <fbl@redhat.com>
> > >
> > > I looked for the change in the previous patch but it wasn't obvious to
> > > me.  Was this in commit 9207546be025 (rhel: bug fix kmod-openvswitch
> > > spec file, rhel6) or something earlier?
> > >
>
diff mbox series

Patch

diff --git a/rhel/kmod-openvswitch-rhel6.spec.in b/rhel/kmod-openvswitch-rhel6.spec.in
index 4e67475..f18802d 100644
--- a/rhel/kmod-openvswitch-rhel6.spec.in
+++ b/rhel/kmod-openvswitch-rhel6.spec.in
@@ -105,10 +105,12 @@  else
 fi
 
 %postun
-for kname in `ls -d /lib/modules/*`
-do
-    rm -rf $kname/weak-updates/openvswitch
-done
+if [ "$1" = 0 ]; then  # Erase, not upgrade
+    for kname in `ls -d /lib/modules/*`
+    do
+        rm -rf $kname/weak-updates/openvswitch
+    done
+fi
 /sbin/depmod -a
 
 %files