Alan D. Salewski on 6 Feb 2010 07:37:08 -0800 |
On Sat, Feb 06, 2010 at 01:50:31AM -0500, John Karr spake thus: > Is there a clean and simple way to make apt take just certain packages > from unstable? (in this case anything PERL). You basically want to use pinning. The comments in the files below explain how this works; they basically "pin" your system to stable, but allow you to easily pull in packages from testing and unstable. HTH, -Al ----8<-----------------------/etc/apt/apt.conf---------------------- // // The 'Default-Release' specifies the default "target release" // used by apt-get and friends. By default it is undefined, but // by specifying it here we can better control the default behavior // of the tools with regard to running a mixed stable/testing/unstable // system. // // The notion of a "target release" works in concert with the // "pinning" rules we've set up in /etc/apt/preferences // // For more info on this stuff, see section 8.2.1 "Pinning releases with APT" // in Martin F. Krafft's _The_Debian_Book_ (1st Ed., 2005). // // Also: // apt.conf(5) // apt_preferences(5) // apt-cache(8), particularly the 'apt-cache policy' command // APT::Default-Release "stable"; ----8<-------------------------------------------------------------- ----8<-----------------------/etc/apt/preferences------------------- Explanation: Modifies APT's idea of which packages should be installed. Explanation: In general, we're running a 'stable' distribution, but want Explanation: to periodically pull in a package from either 'testing' or Explanation: 'unstable'. Explanation: Explanation: Once we've pulled a package in from 'testing', however, we do Explanation: not want to have to keep manually looking for testing updates Explanation: of it. Hence the 'testing' archive has a priority less than Explanation: the 'stable' archive, but above 100 (the value APT automatically Explanation: assigns to an already installed package), and also above 500 Explanation: (the value APT automatically assigns to any package available Explanation: for upgrade or installation, if not overridden here). Explanation: Explanation: Packages pulled from 'unstable' must always be pulled manually; Explanation: we do not want churn there to affect us, even though we like Explanation: to pull in the odd package or three. Explanation: Explanation: For an excellent write-up on the motivation for this and how Explanation: it all hangs together, see section 8.2.1 "Pinning releases with APT" Explanation: in Martin F. Krafft's _The_Debian_System_ book (1st Ed., 2005). Explanation: Explanation: See apt_preferences(5) for the specifics on the contents of Explanation: this file. Package: * Pin: release a=stable Pin-Priority: 900 Package: * Pin: release a=testing Pin-Priority: 800 Package: * Pin: release a=unstable Pin-Priority: 80 -------------------------------------------------------------------- -- a l a n d. s a l e w s k i salewski@worldnet.att.net -------------------------------------------------------------------- Bruce is mad at me you ask who the hell is bruce? Bruce is my liver -------------------------------------------------------------------- Generated from Haiku-O-Matic: www.smalltime.com/haiku.html ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|