Current version (>= .5) of apt supports this.  Read:

http://www.debian.org/doc/manuals/apt-howto/ch-apt-get.en.html

Specfically:

3.7 How to keep a mixed system
People often use the testing distribution because it is more stable than
unstable and more up-to-date than stable. However, users who would like to run
the latest versions of some packages but still rather not trust their entire
systems to unstable also have the option of running mixed testing/unstable
systems. On the flip side, more conservative users may wish to run mixed
stable/testing systems. 

To do that, put the following line on /etc/apt/apt.conf: 

     APT::Default-Release "testing";

Then, when going to install packages from unstable, just use the -t switch: 

     # apt-get -t unstable install packagename

Do not forget that to use packages from a version of Debian, one needs to add
an apt source line to the /etc/apt/sources.list file. In our example's case, we
need source lines for the unstable distribution besides the testing ones. 


--------------------------------------------------------------------------------

3.8 How to upgrade packages from specific versions of Debian
apt-show-versions provides a safe way for users of mixed distributions to
upgrade their systems without getting more of the less-stable distribution than
they had in mind. For instance, it is possible to upgrade just your unstable
packages by running: 

     # apt-get install `apt-show-versions -u -b | grep unstable`


--------------------------------------------------------------------------------

3.9 How to keep specific versions of packages installed (complex)
You may have occasion to modify something in a package and don't have time or
don't want to port those changes to a new version of the program. Or, for
instance, you may have just upgraded your Debian distribution to 3.0, but want
to continue with the version of a certain package from Debian 2.2. You can
"pin" the version you have installed so that it will not be upgraded. 

Using this resource is simple. You just need to edit the file
/etc/apt/preferences. 

The format is simple: 

     Package: <package>
     Pin: <pin definition>
     Pin-Priority: <pin's priority>

For example, to keep package sylpheed that I have modified to use
"reply-to-list" at version 0.4.99, I add: 

     Package: sylpheed
     Pin: version 0.4.99*

Note that I used an * (asterisk). This is a "wildcard"; it say that I want that
this "pin" to be valid for all versions beginning with 0.4.99. This is because
Debian versions its packages with a "Debian revision" and I don't want to avoid
the installation of these revisions. So, for instance, versions 0.4.99-1 and
0.4.99-10 will be installed as soon as they are made available. Note that if
you modified the package you won't want to do things this way. 

The Pin-Priority field is optional; if not specified, it defaults to 989. 

Let's take a look at how pin priorities work. A priority lower than 0 indicates
that the package should never be installed. Priorities 0 to 100 denote packages
that are not installed and that have no available versions. These won't come
into the version-choosing process. Priority 100 is the priority assigned to an
installed package - for the installed version of a package to be replaced by a
different version, the replacement must have a priority greater than 100. 

Priorities above 100 indicate that a package should be installed. Typically,
the installed version of a package is changed only to upgrade it to a newer
version. Any priority between 100 and 1000 (inclusive) indicates this typical
behavior. A package with such a priority will not downgrade to an available
version with a lower version number. For instance, if I have sylpheed 0.5.3
installed and define a pin on sylpheed 0.4.99 with priority 999, package 0.4.99
will not be installed to satisfy the pin. To make a package "downgradable", to
satisfy the pin, it needs possess a priority greater than 1000. 

This concept of downgrading can have powerful applications; suppose that you
just upgraded your stable version of Debian to the testing one but wanted to
retract that decision - perhaps testing just wasn't "tested" enough to suit
you. You can define a default pin, using a wildcard for the package name, to
come back to stable. For example: 

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

After that, a apt-get -u dist-upgrade will downgrade your system to the stable
version. 

A pin can be specified on a package's version, release or origin. 

Pinning on a version, as we have seen, supports literal version numbers as well
as wildcards to specify several versions at one time. 

Option release depends on the Release file from an APT repository or from a CD.
This option may be of no use at all if you're using package repositories that
don't provide this file. You may see the contents of the Release files that you
have on /var/lib/apt/lists/. The paramters for a release are: a (archive), c
(components), v (version), o (origin) and l (label). 

An example: 

     Package: *
     Pin: release v=2.2*,a=stable,c=main,o=Debian,l=Debian
     Priority: 1001

In this example, we chose version 2.2* of Debian (which can be 2.2r2, 2.2r3 --
this accomodates "point releases" that typically include security fixes and
other very important updates), the stable repository, section main (as opposed
to contrib or non-free) and origin and label Debian. Origin (o=) defines who
produced that Release file, the label (l=) defines the name of the
distribution: Debian for Debian itself and Progeny for Progeny, for example. A
sample Release file: 

     $ cat
/var/lib/apt/lists/ftp.debian.org.br_debian_dists_potato_main_binary-i386_Release
     Archive: stable
     Version: 2.2r3
     Component: main
     Origin: Debian
     Label: Debian
     Architecture: i386




 
--- Bob Miller <[EMAIL PROTECTED]> wrote:
> I have a Debian box.  It's running testing.  There are two packages
> (hddtemp and privoxy) that I'd like to add to it, but those packages
> are only available in unstable.
> 
> How do you pull certain packages from unstable while keeping the rest
> of the system at testing?
> 
> Thanks...
> 
> -- 
> Bob Miller                              K<bob>
> kbobsoft software consulting
> http://kbobsoft.com                     [EMAIL PROTECTED]
> 


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

Reply via email to