OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   26-Aug-2003 17:35:23
  Branch: HEAD                             Handle: 2003082616352200

  Modified files:
    openpkg-src/openpkg     openpkg.spec

  Log:
    try to be smarter on rebuilding the database (just an attempt, still
    not tested)

  Summary:
    Revision    Changes     Path
    1.196       +11 -2      openpkg-src/openpkg/openpkg.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/openpkg/openpkg.spec
  ============================================================================
  $ cvs diff -u -r1.195 -r1.196 openpkg.spec
  --- openpkg-src/openpkg/openpkg.spec  26 Aug 2003 13:55:17 -0000      1.195
  +++ openpkg-src/openpkg/openpkg.spec  26 Aug 2003 15:35:22 -0000      1.196
  @@ -1531,8 +1531,17 @@
       #   have to play a little trick here and delay the operation until RPM
       #   thinks this "post" script has already terminated.
       if [ ".$1" = .2 ]; then
  -        ( sleep 2
  -          %{l_prefix}/bin/rpm --rebuilddb
  +        ( #   wait until RPM has released the database
  +          i=0
  +          while [ $i -lt 10 ]; do
  +              %{l_prefix}/bin/rpm -q openpkg >/dev/null 2>&1 && break
  +              sleep 1
  +              i=`expr $i + 1`
  +          done
  +          #   rebuild the RPM database
  +          #   (especially important on upgrade from RPM-4.0.x/DB-3.2.x in order
  +          #   to upgrade from DB version 7 to DB version 8 format files)
  +          %{l_prefix}/bin/rpm --rebuilddb || true
             chown %{l_musr}:%{l_mgrp} %{l_prefix}/RPM/DB/* || true
           ) </dev/null >/dev/null 2>/dev/null &
       fi
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to