RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Per Øyvind Karlsen
  Root:   /v/rpm/cvs                       Email:  pkarl...@rpm5.org
  Module: rpm                              Date:   07-Jan-2011 01:09:24
  Branch: rpm-5_3                          Handle: 2011010700092000

  Modified files:           (Branch: rpm-5_3)
    rpm/scripts             dbconvert.sh

  Log:
    move --rebuilddb to end of script and done in-place with 'nofsync'

  Summary:
    Revision    Changes     Path
    1.1.2.13    +8  -6      rpm/scripts/dbconvert.sh
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/scripts/dbconvert.sh
  ============================================================================
  $ cvs diff -u -r1.1.2.12 -r1.1.2.13 dbconvert.sh
  --- rpm/scripts/dbconvert.sh  21 Nov 2010 06:14:27 -0000      1.1.2.12
  +++ rpm/scripts/dbconvert.sh  7 Jan 2011 00:09:20 -0000       1.1.2.13
  @@ -123,12 +123,6 @@
       -e '/^h_nelem=/d' \
       -e 's/^ \(..\)\(..\)\(..\)\(..\)$/ \4\3\2\1/' \
       | $db_load -c db_lorder=4321 -h "$NEWDB" Packages
  -if [ $DBREBUILD -ne 0 ]; then 
  -    echo "--> regenerate the indices"
  -    rpm \
  -     --dbpath "$NEWDB" \
  -     --rebuilddb -vv
  -fi
   echo "--> test the conversion"
   rpm --dbpath "$NEWDB" -qa > /dev/null && \
   rpm --dbpath "$NEWDB" -q rpm > /dev/null
  @@ -154,6 +148,14 @@
       fi
       $db_recover -h "$DBHOME"
       rm -rf "$NEWDB"
  +    if [ $DBREBUILD -ne 0 ]; then
  +     echo "--> regenerate the indices"
  +     DBI_TXN="$(rpm --eval %__dbi_txn) nofsync"
  +     rpm \
  +         --dbpath "$DBHOME" \
  +         --rebuilddb -vv \
  +         --define "%__dbi_txn $DBI_TXN"
  +    fi
   else
       echo "Conversion failed"
   fi
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to