From: Dwight Engen Date: Mon, 15 Oct 2012 13:42:10 +0000 (-0400) Subject: Always rebuild rpm database X-Git-Tag: lxc-0.9.0.alpha1~1^2~111 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b88d7bb629849748346c1faf394d30c4c740ddf9;p=thirdparty%2Flxc.git Always rebuild rpm database Always rebuild the rpm database with the guest's rpm so there are no db version mismatches when you boot the guest and run rpm or yum. Signed-off-by: Dwight Engen --- diff --git a/templates/lxc-oracle.in b/templates/lxc-oracle.in index 05fac59a8..566815112 100644 --- a/templates/lxc-oracle.in +++ b/templates/lxc-oracle.in @@ -412,9 +412,13 @@ container_rootfs_create() $db_dump_cmd $db |$db_load_cmd $db.new mv $db.new $db done - chroot $container_rootfs rpm --rebuilddb fi + # the host rpm may not be the same as the guest, rebuild the db with + # the guest rpm version + echo "Rebuilding rpm database" + rm -f $container_rootfs/var/lib/rpm/__db* + chroot $container_rootfs rpm --rebuilddb >/dev/null 2>&1 ) 200>/var/lock/subsys/lxc-oracle-$name }