[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Further apt_preferences man page fixes



On Sun, 2003-02-09 at 10:32, Thomas Hood wrote:
> More serious is the issue of priority assignment to "instance"
> versus "version".  It appears that I was fairly successful in
> expressing my belief about how APT works, but less successful
> in expressing an accurate belief.  Based on what I read in 
> #179868, I take it that APT assigns priorities to versions,
> not to instances; it does not keep track of instances until
> it needs to find an instance of a selected version to download
> for installation.  Is this right?

Well, I have looked into this, and it does appear that I was
wrong.  I conducted an experiment with the following sources.list.

deb http://ftp.nl.debian.org/debian woody main
deb http://ftp.uk.debian.org/debian woody main

In preferences I assign priority 900 to the UK site and 800 to
the NL site.  apt-cache policy output looks like this:

$ apt-cache policy
Package Files:
 100 /var/lib/dpkg/status
     release a=now
 900 http://ftp.uk.debian.org woody/main Packages
     release v=3.0r1a,o=Debian,a=stable,l=Debian,c=main
     origin ftp.uk.debian.org
 800 http://ftp.nl.debian.org woody/main Packages
     release v=3.0r1a,o=Debian,a=stable,l=Debian,c=main
     origin ftp.nl.debian.org
Pinned Packages:

If priority is assigned to instances then apt-get should get
the package from the UK site because instances from there
have higher priority.  If priority is assigned to versions
then apt-get should get the package from the NL site because
that is listed first in sources.list.

In fact apt-get gets the package from the NL site.  So it
does appear that priorities are assigned to versions, not
to instances.

The apt_preferences man page needs to be corrected.  I'll
work on it.  Please send other patches and comments to me
and I'll roll them into a new patch.

-- 
Thomas Hood <jdthood@yahoo.co.uk>



Reply to: