Skip to content

Commit

Permalink
- use "new" rpmdb tool for database creation (based on a patch from D…
Browse files Browse the repository at this point in the history
…irk)
  • Loading branch information
adrianschroeter committed Feb 1, 2013
1 parent 029f89f commit b06d385
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions init_buildsystem
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,12 @@ init_db()
echo initializing rpm db...
if ! test -e $BUILD_ROOT/usr/lib/rpm/cpuinfo.yaml; then
# rpm v5 does not have initdb
chroot $BUILD_ROOT rpm --initdb || cleanup_and_exit 1
# rpmdb --initdb is recommended and exists since SL9
if [ -x $BUILD_ROOT/usr/bin/rpmdb ]; then
chroot $BUILD_ROOT /usr/bin/rpmdb --initdb || cleanup_and_exit 1
else
chroot $BUILD_ROOT rpm --initdb || cleanup_and_exit 1
fi
fi
# hack: add nofsync to db config to speed up install
mkdir -p $BUILD_ROOT/root
Expand Down Expand Up @@ -1415,7 +1420,11 @@ fi

if test -x $BUILD_ROOT/bin/rpm -a ! -f $BUILD_ROOT/var/lib/rpm/packages.rpm -a ! -f $BUILD_ROOT/var/lib/rpm/Packages ; then
echo "initializing rpm db..."
chroot $BUILD_ROOT rpm --initdb || cleanup_and_exit 1
if [ -x $BUILD_ROOT/usr/bin/rpmdb ]; then
chroot $BUILD_ROOT /usr/bin/rpmdb --initdb || cleanup_and_exit 1
else
chroot $BUILD_ROOT rpm --initdb || cleanup_and_exit 1
fi
# create provides index
chroot $BUILD_ROOT rpm -q --whatprovides rpm >/dev/null 2>&1
fi
Expand Down

0 comments on commit b06d385

Please sign in to comment.