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

Re: is it possible to change apt-get's access priorities?



On Thu, 08 Jul 2004 17:15:13 -0700
listcomm@ml1.net wrote:

> Well, yes, I had read that...  several times.  (Not that the answer
> may not be in there and I'm staring right at it and not seeing it,
> *but...*).
> 
> I'm able to make "apt-get" work from either CD-ROM or from the
> archive. I've got all the entries for the CD-ROM and the archives
> correct. The problem is whether or not it's possible to rearrange
> "apt-get"'s priorities for how it selects packages and dependencies.
> 
> One quote from the document you pointed at, is what I'd mentioned
> earlier:
> 
> "It's important to note that APT always looks for the most recent
> versions of packages. Therefore, if your /etc/apt/sources.list
> were to list an archive that had a more recent version of a package
> than the version on the CD, APT would download the package from
> there."
> 
> The thing is, what I *want* it to do, in a case where I'm just
> trying to load something initially and get it running, is to go get
> whatever it can find from the stable distribution on the CD-ROM, to
> start with.  Then if I don't like that, or whatever it is doesn't
> work, I want to point it at an upgrade on a distribution archive.
> But the behavior (as the above quote suggests) seems to be that it
> will go for the most recent version no matter what.

Hello,

If I'm understanding you properly, you want apt-pinning to work with 4
repositories: 1) CDs, 2) stable on debian.org servers, 3) testing on
debian.org server and 4) unstable on debian.org servers.

You'll need an /etc/apt/preferences file, if you don't have one already.
Here's how I had it set for using Woody with an occasional package from
Testing and Unstable:

Package: *
Pin: release a=stable
Pin-Priority: 900

Package: *
Pin: release a=testing
Pin-Priority: 60

Package: *
Pin: release a=unstable
Pin-Priority: 60

You can also set the following line in /etc/apt/apt.conf, but I didn't
find it essential when I was using it:

APT::Default-Release "stable";

You will probably want to set the following line in /etc/apt/apt.conf as
well, to avoid apt-get segfaulting during an update.

APT::Cache-Limit 10000000;

This should now give you only packages from stable (Woody), unless you
ask for something different. It should also get Woody's packages off the
CDs instead of the internet whenever possible. However, keep in mind
that a lot has changed in Woody since it was first released, so if your
cds are very old it may not use them much.

Also, there were a couple of large library upgrades between Woody and
Sarge (testing), such as libc6. This may make it so that you can't
install that neat package you want from Sarge until you upgrade libc6
and a few other related packages, making for a large download. (There is
a library for libc6 to have backwards compatability, however, so you
shouldn't have to worry about that part.)

Finally, if you use "apt-get -t release install packagename" (where
release is testing or unstable, and packagename is the name of the
package you want to install), instead of "apt-get packagename/release",
it will download the needed dependencies from the same release as
packagename, instead of downloading the package and using dependencies
from your old release. This can be both good and bad, depending on your
circumstances, but most often it's good.

HTH & HAND,
Jacob

-- 
GnuPG Key: 1024D/16377135

Random .signature #20:
Windows: Microsoft's tax on computer illiterates.



Reply to: