xenserver: Run "depmod" after old modules are removed by "rpm -U".
authorBen Pfaff <blp@nicira.com>
Tue, 14 Jun 2011 17:36:56 +0000 (10:36 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 28 Jul 2011 18:21:57 +0000 (11:21 -0700)
commitf6f9437ba35e58203a614a9bf765e87d37f4da29
tree2c63f811f873f98c4c8d07c249de88d46b99b594
parent44f2560c67fca0d5712a3bec309e4e93e9e63a7b
xenserver: Run "depmod" after old modules are removed by "rpm -U".

http://fedoraproject.org/wiki/Packaging/ScriptletSnippets says that
package upgrade does the following steps:

    1.  %pretrans of new package
    2.  %pre of new package
    3. (package install)
    4.  %post of new package
    5.  %triggerin of other packages (set off by installing new package)
    6.  %triggerin of new package (if any are true)
    7.  %triggerun of old package (if it's set off by uninstalling the old
       package)
    8.  %triggerun of other packages (set off by uninstalling old package)
    9.  %preun of old package
   10. (removal of old package)
   11.  %postun of old package
   12.  %triggerpostun of old package (if it's set off by uninstalling the
       old package)
   13.  %triggerpostun of other packages (if they're setu off by
       uninstalling the old package)
   14.  %posttrans of new package

We're getting in trouble because the %post runs in step 4 before the
old files are removed in step 10, so depmod is finding the old modules.
This commit switches to running depmod in step 14 instead, after the
old files are removed.

Bug #5916.
Reported-by: Jesse Gross <jesse@nicira.com>
Reported-by: Henrik Amren <henrik@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
xenserver/openvswitch-xen.spec