- Old versions of myplc used to ship with a bootstrapped database and
/etc/planetlab directory. Including generated files in the manifest
was dangerous; if /plc/data/var/lib/pgsql/data/base/1/16676 changed
names from one RPM build to another, it would be rpmsaved and thus
effectively deleted. Now we do not include these files in the
manifest. However, to avoid deleting these files in the process of
upgrading from one of these old versions of myplc, we must back up
the database and /etc/planetlab and restore them after the old
version has been uninstalled in %triggerpostun.
- add changelog
-#./build_devel.sh
-#./build.sh
+./build_devel.sh
+./build.sh
if [ $1 -gt 0 ] ; then
for dir in /var/lib/pgsql/data /etc/planetlab ; do
if [ -d /plc/data/$dir ] ; then
if [ $1 -gt 0 ] ; then
for dir in /var/lib/pgsql/data /etc/planetlab ; do
if [ -d /plc/data/$dir ] ; then
+ echo "Preserving /plc/data/$dir"
mv /plc/data/$dir /plc/data/$dir.rpmsave
fi
done
mv /plc/data/$dir /plc/data/$dir.rpmsave
fi
done
if [ $1 -gt 0 ] ; then
for dir in /var/lib/pgsql/data /etc/planetlab ; do
if [ -d /plc/data/$dir.rpmsave -a -d /plc/data/$dir ] ; then
if [ $1 -gt 0 ] ; then
for dir in /var/lib/pgsql/data /etc/planetlab ; do
if [ -d /plc/data/$dir.rpmsave -a -d /plc/data/$dir ] ; then
+ echo "Merging /plc/data/$dir"
if tar -C /plc/data/$dir.rpmsave -cpf - . | \
tar -C /plc/data/$dir -xpf - ; then
rm -rf /plc/data/$dir.rpmsave
if tar -C /plc/data/$dir.rpmsave -cpf - . | \
tar -C /plc/data/$dir -xpf - ; then
rm -rf /plc/data/$dir.rpmsave