I found this useful when needed to fix a pre-install error in a debian package.

mkdir another-out-dir
dpkg-deb -x some-deb.deb another-out-dir
dpkg-deb -e some-deb.deb another-out-dir/DEBIAN
# modify another-out-dir/DEBIAN/preinst)
dpkg-deb -b another-out-dir some-deb2.deb
dpkg -i some-deb2.deb