- do not fail with rpm v5 (Mandriva 2011)
authorAdrian Schröter <adrian@suse.de>
Tue, 25 Oct 2011 14:33:06 +0000 (16:33 +0200)
committerAdrian Schröter <adrian@suse.de>
Tue, 25 Oct 2011 14:33:06 +0000 (16:33 +0200)
init_buildsystem

index 5621b40..3efd216 100755 (executable)
@@ -217,7 +217,10 @@ init_db()
 {
     if test $PSUF = rpm ; then
        echo initializing rpm db...
-       chroot $BUILD_ROOT rpm --initdb || cleanup_and_exit 1
+        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
+        fi
        # hack: add nofsync to db config to speed up install
        mkdir -p $BUILD_ROOT/root
        echo '%__dbi_perms perms=0644 nofsync' > $BUILD_ROOT/.rpmmacros