I've had a problem with emacs, for a while: the DOC strings are not
right for my binary. I suspect that this is related to the symlink in
./etc/ which points to DOC.
More recently, I had a problem linking a program -- the error messages
indicated that my linking libraries were corrupt. So, I pulled down a
bunch of packages (for devel and emacs) from sunsite to re-install
them. Only thing is: dpkg is completely oriented towards the first
time user doing a first time install.
So, I ripped some code out of dpkg and build myself a pair of
utilities that assume I know what I'm doing, and allow myself to
reinstall a package.
Reinstalling fixed the linking problem, but not the emacs DOC problem.
They are inst_all [which installs all debian packages located in the
current directory], and inst [which takes argument of a floppy disk
device, will mount it and do inst_all]. So, instead of mucking around
with cpio and all, I just do `inst fd0` and everything on the floppy
There are no options on these programs, I'm providing them as
I don't guarantee that I understood all the implications of dpkg's
organization, so there may be some administrative aspects that these
programs don't deal with.
I put these in /sbin
-------------------- inst ------------------------
mkdir -p /tmp/install
mount -t msdos /dev/$1 /tmp/install || exit 1
-------------------- inst_all --------------------
for FILE in $DIR/*.deb
if [ -f $FILE ]
echo $FILE does not exist.
if [ -f /var/adm/dpkg/desc/$PKG.desc ]
PKG=`basename $FILE .deb`
echo -n Installing $PKG
zcat $FILE 2>>/var/adm/dpkg/dpkg.log | cpio -Vimud
if [ -f /var/adm/dpkg/list/$PKG.list ]
if [ -f /var/adm/dpkg/perm/$PKG.perm ]
echo -n Fixing the permissions of $PKG ...
fixperms -q $PKG
echo inst_all: Could not find fixperms for the package $PKG
echo inst_all: $PKG is not an installed package.
echo "Installation of $PKG complete."
for INST in /var/adm/dpkg/inst/*.inst
if [ -f $INST ]
sh $INST && rm -f $INST