if [ ! -r var/lib/rpm/Packages ]; then
  ( cd var/lib/rpm/tmp ; cp -a * .. )
fi
( cd var/lib/rpm && rm -f tmp/* && rmdir tmp )
# Symlinks:
( cd bin ; rm -rf rpm )
( cd bin ; ln -sf ../usr/bin/rpm rpm )
( cd usr/bin ; rm -rf rpmquery )
( cd usr/bin ; ln -sf rpm rpmquery )
( cd usr/bin ; rm -rf rpmverify )
( cd usr/bin ; ln -sf rpm rpmverify )
( cd usr/lib ; rm -rf librpm.so )
( cd usr/lib ; ln -sf librpm.so.9.1.3 librpm.so )
( cd usr/lib ; rm -rf librpm.so.9 )
( cd usr/lib ; ln -sf librpm.so.9.1.3 librpm.so.9 )
( cd usr/lib ; rm -rf librpmbuild.so )
( cd usr/lib ; ln -sf librpmbuild.so.9.1.3 librpmbuild.so )
( cd usr/lib ; rm -rf librpmbuild.so.9 )
( cd usr/lib ; ln -sf librpmbuild.so.9.1.3 librpmbuild.so.9 )
( cd usr/lib ; rm -rf librpmio.so )
( cd usr/lib ; ln -sf librpmio.so.9.1.3 librpmio.so )
( cd usr/lib ; rm -rf librpmio.so.9 )
( cd usr/lib ; ln -sf librpmio.so.9.1.3 librpmio.so.9 )
( cd usr/lib ; rm -rf librpmsign.so )
( cd usr/lib ; ln -sf librpmsign.so.9.1.3 librpmsign.so )
( cd usr/lib ; rm -rf librpmsign.so.9 )
( cd usr/lib ; ln -sf librpmsign.so.9.1.3 librpmsign.so.9 )
