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

Re: Configuring /etc/apt/preferences



Vincent Lefevre wrote:

On 2004-04-22 23:49:49 +0200, Andrei Badea wrote:

Having a slow Internet connection, I want to set /etc/apt/preferences so that packages from the CDs have a greater priority that those on the network. So I put in preferences:

Package: *
Pin: origin ftp.cz.debian.org
Pin-Priority: 500

IMHO this should set a priority of 500 for all packages from the ftp mirror.


If I've understood correctly, this sets a priority of *at least* 500
for all packages from the ftp mirror. But you may have other rules
setting a higher priority.

I tried to change /etc/apt/preferences to this (one single rule):

Package: *
Pin: origin ftp.cz.debian.org
Pin-Priority: 999

in order to increase the priority, just to see what would happen. Unfortunately nothing, on apt-cache policy I get the same list that I posted before. All sources have the same priority 990. Maybe the "origin" syntax is wrong?

To be complete, here is my sources.list:

deb cdrom:[Debian GNU/Linux 20040218 _Sid_ - fsn.hu unofficial i386 Binary-3 (20040218)]/ unstable contrib main non-US/contrib non-US/main non-US/non-free non-free deb cdrom:[Debian GNU/Linux 20040218 _Sid_ - fsn.hu unofficial i386 Binary-2 (20040218)]/ unstable contrib main main/debian-installer non-US/contrib non-US/main non-US/non-free non-free deb cdrom:[Debian GNU/Linux 20040218 _Sid_ - fsn.hu unofficial i386 Binary-1 (20040218)]/ unstable contrib main main/debian-installer non-US/contrib non-US/main non-US/non-free non-free
deb ftp://ftp.cz.debian.org/debian unstable contrib main

However, when I do a "apt-cache policy", I get:

... lines for the cdroms, priority 990 ...
990 ftp://ftp.cz.debian.org unstable/main Packages
    release o=Debian,a=unstable,l=Debian,c=main
    origin ftp.cz.debian.org
990 ftp://ftp.cz.debian.org unstable/contrib Packages
    release o=Debian,a=unstable,l=Debian,c=contrib
    origin ftp.cz.debian.org
Pinned Packages:

So the priority of the network packages still is 990. Also, when I try to install a package, APT would always install the newest version from the network.

Could please anyone explain why? Thank you for any help.


This 990 may come from that [from apt_preferences(5)]:

   priority 990
       to  the versions that are not installed and belong to the target
       release.

(whatever the source...).

Indeed, I set the target release to unstable in apt.conf.

The problem with preferences is that one can only increase a priority,
not decrease it.

I didn't understand this from the manual, thank you.

--

Andrei



Reply to: