Hi

I have read up on Debian Package Management as much as I can at this stage.
Thanks to the Debian Policy manual, I understand how the remote
repositories are structured
and how sources.list is used to consult the repositories to locate updates.

I understand what is contained in a package file and that it has everything
required
to install AND remove a package. I have delved into the /var/lib/dpkg
directory and
I understand that the info sub directory contains the scripts and
information needed to remove a package.
So far so good.

My confusion begins with these files:
/var/cache/apt/pkgcache.bin
/var/lib/dpkg/status
/var/lib/dpkg/available

I have observed that it doesn't really matter if pkgcache.bin doesn't exist
because apt-get update
quickly rebuilds it to its full size. Does it rebuild it by trawling through
the repository again?
What is it used for/what does it contain? It would seem to be redundant
based on what the next two files
are used for.

In the /var/lib/dpkg directory there are two important files: *available *and
*status*.
status is the most important one as nothing will work if it is lost or
corrupted.
Both contain the standard control information on each package. status,
on my machine, only contains descriptions of packages that are actually
installed.
This seems to be the definitive source for determining that a package is
installed.
If you remove a package it is removed from the status file. I presume
apt-get
relies on status to tell if a package is already installed?
What is "available" for and how is it built up?
My understanding is that dpkg does not have the concept of a configured
remote repository.
So in the world of dpkg, what does it mean to say that a package is
"available"?

I figure I need to understand how dpkg works because apt builds on top of
it.

How this is not too many questions and thanks in advance for the help,
Ciaran

Reply via email to