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 rpm2cpio )
( cd usr/bin ; ln -sf rpm2archive rpm2cpio )
( 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/lib64 ; rm -rf librpm.so )
( cd usr/lib64 ; ln -sf librpm.so.10 librpm.so )
( cd usr/lib64 ; rm -rf librpm.so.10 )
( cd usr/lib64 ; ln -sf librpm.so.10.2.0 librpm.so.10 )
( cd usr/lib64 ; rm -rf librpmbuild.so )
( cd usr/lib64 ; ln -sf librpmbuild.so.10 librpmbuild.so )
( cd usr/lib64 ; rm -rf librpmbuild.so.10 )
( cd usr/lib64 ; ln -sf librpmbuild.so.10.2.0 librpmbuild.so.10 )
( cd usr/lib64 ; rm -rf librpmio.so )
( cd usr/lib64 ; ln -sf librpmio.so.10 librpmio.so )
( cd usr/lib64 ; rm -rf librpmio.so.10 )
( cd usr/lib64 ; ln -sf librpmio.so.10.2.0 librpmio.so.10 )
( cd usr/lib64 ; rm -rf librpmsign.so )
( cd usr/lib64 ; ln -sf librpmsign.so.10 librpmsign.so )
( cd usr/lib64 ; rm -rf librpmsign.so.10 )
( cd usr/lib64 ; ln -sf librpmsign.so.10.2.0 librpmsign.so.10 )
