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 usr/bin ; rm -rf rpmverify )
( cd usr/bin ; ln -sf ../../bin/rpm rpmverify )
( cd usr/bin ; rm -rf rpmquery )
( cd usr/bin ; ln -sf ../../bin/rpm rpmquery )
( cd usr/lib ; rm -rf librpmbuild.so )
( cd usr/lib ; ln -sf librpmbuild.so.3.0.0 librpmbuild.so )
( cd usr/lib ; rm -rf librpmio.so.3 )
( cd usr/lib ; ln -sf librpmio.so.3.0.0 librpmio.so.3 )
( cd usr/lib ; rm -rf librpmsign.so )
( cd usr/lib ; ln -sf librpmsign.so.1.0.0 librpmsign.so )
( cd usr/lib ; rm -rf librpm.so )
( cd usr/lib ; ln -sf librpm.so.3.0.0 librpm.so )
( cd usr/lib ; rm -rf librpmio.so )
( cd usr/lib ; ln -sf librpmio.so.3.0.0 librpmio.so )
( cd usr/lib ; rm -rf librpmsign.so.1 )
( cd usr/lib ; ln -sf librpmsign.so.1.0.0 librpmsign.so.1 )
( cd usr/lib ; rm -rf librpmbuild.so.3 )
( cd usr/lib ; ln -sf librpmbuild.so.3.0.0 librpmbuild.so.3 )
( cd usr/lib ; rm -rf librpm.so.3 )
( cd usr/lib ; ln -sf librpm.so.3.0.0 librpm.so.3 )
