[BusyBox] issue with installing, then removing a package with "dpkg"
Robert P. J. Day
rpjday at mindspring.com
Sat Mar 20 12:54:12 UTC 2004
while i can install a .deb file created on my server with BB's "dpkg"
command, i can't seem to uninstall it with that same command.
as background, i want to install my first .deb package file on a
PPC-based system that has *no* dpkg infrastructure on it at all, so it's
not surprising that the first attempt fails, and forces me to at least
create the dpkg administrative directories and files that will be used for
subsequent .deb files. here's what happens:
# dpkg -i tds_1_ppc-Linux.deb
dpkg: /var/lib/dpkg/status: No such file or directory
ok, so i need a /var/lib/dpkg directory and status file, neither of which
exist yet, so i'll just cram them in manually:
# mkdir /var/lib/dpkg
# touch /var/lib/dpkg/status
now, try again:
# dpkg -i tds_1_ppc-Linux.deb
Unpacking tds (from tds_1_ppc-Linux.deb) ... # ok, getting there
... time passes, suggesting things are being installed ...
dpkg: /var/lib/dpkg/info/tds.list: No such file or directory
this suggests that i should have had an "info" directory, inside of which
"dpkg" would be keeping track of installed packages, which makes sense.
but a quick look shows that the files *have* been installed in the
appropriate locations. this is really kind of disturbing since you'd
think that dpkg would first check for essential files before starting to
dump stuff all over the filesystem. as it is, then, i've installed the
contents of the .deb file, but have no official record of it. ouch.
just for fun, i'll create the info directory, and try again:
# mkdir /var/lib/dpkg/info
# dpkg -i tds_1_ppc-Linux.deb
Unpacking tds (from tds_1_ppc-Linux.deb) ...
Setting up tds (1) ...
#
hmmm ... that seemed to work and, sure enough, i now have the file
/var/lib/dpkg/info/tds.list, which contains the fully-qualified list
of filenames that were installed.
ok, so what if i try to list the installed packages:
# dpkg -l
Name Version
+++-==============-==============
#
hmmm ... nothing installed? that would explain why i can't remove that
package with either of:
# dpkg -P
# dpkg -r
in a nutshell, then, the issues are:
1) if there is *no* dpkg infrastructure on the system yet, should the
first dpkg install create it? or must that be done manually? i'm
fine with either approach, as long as i know which approach should
be used.
2) should dpkg happily install the contents of a .deb file, only to
realize afterwards that it can't record that installation since
there's no /var/lib/dpkg/info directory?
3) why, if there's clearly a "tds.list" file in my case, with the
correct list of associated files, should "dpkg -l" tell me there
are no installed packages?
4) why do the usage message, online docs and actual dpkg.c source code
differ in terms of options?
usage message and online docs: iCPru
dpkg.c itself: CFilPru
very confusing.
rday
More information about the busybox
mailing list