FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 05-08-2011, 11:51 AM
Ciaran Smith
 
Default Need debian package management status files explained

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
 
Old 05-08-2011, 04:02 PM
Ron Johnson
 
Default Need debian package management status files explained

On 05/08/2011 06:51 AM, Ciaran Smith wrote:

Hi
I have read up on Debian Package Management as much as I can at this stage.

[snip]

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,


Why?

Curiosity? (Which is a just and valid reason...)

--
"Neither the wisest constitution nor the wisest laws will secure
the liberty and happiness of a people whose manners are universally
corrupt."
Samuel Adams, essay in The Public Advertiser, 1749


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4DC6BE7E.9000206@cox.net">http://lists.debian.org/4DC6BE7E.9000206@cox.net
 
Old 05-08-2011, 04:42 PM
Ciaran Smith
 
Default Need debian package management status files explained

On 08/05/2011 17:02, Ron Johnson wrote:

On 05/08/2011 06:51 AM, Ciaran Smith wrote:

Hi
I have read up on Debian Package Management as much as I can at this
stage.

[snip]

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,


Why?

Curiosity? (Which is a just and valid reason...)

Yes. I would have to say its a need to know "whats going on" and how it
works.



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4DC6C7EE.30609@gmail.com">http://lists.debian.org/4DC6C7EE.30609@gmail.com
 
Old 05-08-2011, 06:49 PM
Paul E Condon
 
Default Need debian package management status files explained

On 20110508_110206, Ron Johnson wrote:
> On 05/08/2011 06:51 AM, Ciaran Smith wrote:
> >Hi
> >I have read up on Debian Package Management as much as I can at this stage.
> [snip]
> >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,
>
> Why?
>
> Curiosity? (Which is a just and valid reason...)

When I first started using Debian, back in the last century, aptitude
didn't exist, or at least it didn't yet exist in a form that was
stable enough to be mentioned in the user documentation. There was a
different GUI interface whose name slips my mind, and the actual
capabilities of the apt system were much more primative than what we
have now. But the story about how it works has changed very little.

I've tried to look into how it works. For any file it is difficult to
determine whether it is there in order to satisfy the current mode of
operation or it is cruft left from an earlier time. Even a reason for
something can be cruft left from an earlier time. i.e. That reason
was once a design goal or whatever, and has become irrelavant because
it is satisfied by some other means.

I hope Ciaran's post provokes some serious answers from serious
people. Or there might already exist a serious document that can be
referenced. Curiosity is a good reason to ask, but the answers should
exist already, even if no one asks. If they don't ...

--
Paul E Condon
pecondon@mesanetworks.net


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110508184928.GE17964@big.lan.gnu">http://lists.debian.org/20110508184928.GE17964@big.lan.gnu
 
Old 05-09-2011, 12:20 AM
Henrique de Moraes Holschuh
 
Default Need debian package management status files explained

On Sun, 08 May 2011, Ciaran Smith wrote:
> My confusion begins with these files:
> /var/cache/apt/pkgcache.bin

Read the apt source and any documentation on its internals.

> /var/lib/dpkg/status
> /var/lib/dpkg/available

Read the dpkg source, and possibly the dselect source (ick), as well as
the documentation on dpkg internals.

> 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?

apt-get relies on dpkg, so you now need to go into dpkg internals.

> My understanding is that dpkg does not have the concept of a configured
> remote repository.

Correct.

> So in the world of dpkg, what does it mean to say that a package is
> "available"?

AFAIK, it is some old crap related to dselect, so take a look at dselect
as well. It is also possible that apt uses it for something.

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

Correct.

I think you can get better answers in the dpkg development ML... this thread
is kind out-of-depth for debian-user :-p

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110509002004.GA30394@khazad-dum.debian.net">http://lists.debian.org/20110509002004.GA30394@khazad-dum.debian.net
 

Thread Tools




All times are GMT. The time now is 11:40 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org