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

Re: apt-cache stable/testing



On Wed, 09 Apr 2003 14:30:07 +0200, David Fokkema <fokkema@nat.vu.nl>
wrote:
> > > I have a server running stable, but occasionally I want to get a
> > > package from testing that is not yet included in stable. So, I
> > > have both stable and testing in my sources list and
> > > default-release stable in my apt.conf.
> >
> > I very much recommend building newer packages from source instead.
> > If you're installing packages from testing these days, they'll
> > likely depend on a newer libc6, and at that point you might as well
> > be running testing.
> 
> That is what I do. But before that, I check if testing has the package
> I want, or a newer version available. Basically, I never run apt-get
> -t testing foo.
> 
> > > When I run apt-cache to search for a package, I want to know
> > > whether the results are from stable or testing, or from a locally
> > > compiled and installed package. Does someone know how to do this?
> >
> > Use 'apt-cache policy <package>'.
> 
> Er, it shows the current version, and a version candidate, which is
> also taken from stable, so this only tells me about the version I have
> installed. Wouldn't it be nice if apt-cache would accept the -t
> testing argument?
> 
> Regards,
> David
> 
> 

You need to add testing lines to your /etc/apt/sources.list (both deb
and deb-src lines). Then, you need to pin the testing lines lower than
the stable lines, and probably also lower than the currently installed
packages. Do this by editing /etc/apt/preferences, as follows:

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

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

(If -10 doesn't work for testing, try using 50 for testing - they
should have slightly different effects. I'm not sure whether choosing
50 will let hand-recompiled packages to override official packages of
the same version.)

Then use the apt-cache policy tip as above.

If you're not thrilled with this idea, there's also
http://packages.debian.org/ which lets you check out packages without
having sources.list lines for their branches. My suggestion, however, is
to edit the sources.list and preferences files because then you can use
apt-get source or apt-src or apt-build.


-- 
I usually have a GPG digital signature included as an attachment.
If you don't know what it is, either ignore it or visit www.gnupg.org
Fingerprint: D5E2 8839 6ED3 3305 805C  941F 9476 A9BD E2B2 CAD1
The key is keyID E2B2CAD1 on pgp.mit.edu



Reply to: