( cd usr/bin ; rm -rf rpmbuild )
( cd usr/bin ; ln -sf ../lib/rpm/rpmb rpmbuild )
( cd usr/bin ; rm -rf rpmdb )
( cd usr/bin ; ln -sf ../lib/rpm/rpmd rpmdb )
( cd usr/bin ; rm -rf rpme )
( cd usr/bin ; ln -sf ../lib/rpm/rpme rpme )
( cd usr/bin ; rm -rf rpmi )
( cd usr/bin ; ln -sf ../lib/rpm/rpmi rpmi )
( cd usr/bin ; rm -rf rpmquery )
( cd usr/bin ; ln -sf ../lib/rpm/rpmq rpmquery )
( cd usr/bin ; rm -rf rpmsign )
( cd usr/bin ; ln -sf ../lib/rpm/rpmk rpmsign )
( cd usr/bin ; rm -rf rpmu )
( cd usr/bin ; ln -sf ../lib/rpm/rpmu rpmu )
( cd usr/bin ; rm -rf rpmverify )
( cd usr/bin ; ln -sf ../lib/rpm/rpmv rpmverify )
( cd usr/lib ; rm -rf librpm.so )
( cd usr/lib ; ln -sf librpm-4.2.so librpm.so )
( cd usr/lib ; rm -rf librpmbuild.so )
( cd usr/lib ; ln -sf librpmbuild-4.2.so librpmbuild.so )
( cd usr/lib ; rm -rf librpmdb.so )
( cd usr/lib ; ln -sf librpmdb-4.2.so librpmdb.so )
( cd usr/lib ; rm -rf librpmio.so )
( cd usr/lib ; ln -sf librpmio-4.2.so librpmio.so )
( cd usr/lib ; rm -rf librpmio.so.0 )
( cd usr/lib ; ln -sf librpmio.so librpmio.so.0 )
( cd usr/lib/rpm ; rm -rf rpme )
( cd usr/lib/rpm ; ln -sf rpmi rpme )
( cd usr/lib/rpm ; rm -rf rpmpopt )
( cd usr/lib/rpm ; ln -sf rpmpopt-4.2.1 rpmpopt )
( cd usr/lib/rpm ; rm -rf rpmt )
( cd usr/lib/rpm ; ln -sf rpmb rpmt )
( cd usr/lib/rpm ; rm -rf rpmu )
( cd usr/lib/rpm ; ln -sf rpmi rpmu )
( cd usr/lib/rpm ; rm -rf rpmv )
( cd usr/lib/rpm ; ln -sf rpmq rpmv )
( cd usr/lib ; rm -rf rpmpopt )
( cd usr/lib ; ln -sf rpm/rpmpopt rpmpopt )
( cd usr/lib ; rm -rf rpmrc )
( cd usr/lib ; ln -sf rpm/rpmrc rpmrc )
if [ ! -r var/lib/rpm/Packages ]; then
  ( cd var/lib/rpm/tmp ; cp -a * .. )
fi
( cd var/lib/rpm && rm -f tmp/* && rmdir tmp )
