On Fri, Jun 07, 2002 at 08:10:52AM -0500, Amy Tanner wrote:
> Is there a way to use apt-get to install a particular version of a
> package?  I was trying to install kernel-source-2.4.9-31 but the APT
> repository also had 2.4.9-34.  I couldn't find a way to tell it the
> version number I wanted.  It seems, apt will always install the latest
> version by default but surely there must be a way to specify other.
> I couldn't find anything in the man pages on this.  Thanks.

Personally, I don't try to decipher the kernel-source packages and the
mass of patches that are applied in one monolithic diff file.  This is
my one pet-peeve with Debian packages.  They do /not/ respect the patch!
;-)  There are some packages that are now shipping with a tarball of
patches applied during the build process rather than during the initial
unpacking process.

Back to the kernel-source.  These packages are largely useless.  I've
found them more confusing than anything.  The easiest way to create a
Debian kernel is to download the original kernel tarball, then use
make-kpkg from the kernel-package toolkit.

	cd ~
	mkdir src
	cd src
	tar -zxvf linux-2.4.9.tar.gz
	cd linux
	cp /boot/config-2.4.x .config
	make menuconfig
	make-kpkg clean
	sudo make-kpkg --revision='1:200205071' \
		--append-to-version='-custom' \
		kernel_image 2&>1 | \
		tee /tmp/linux-2.4.9-custom-200205071

	#dpkg --install ../kernel-image-2.4.9...

Now, to answer some of your apt questions, you must specify which
distribution you want to install from: stable, testing, or unstable.
-31 may be in stable but not in testing.  Your /etc/apt/sources.list
file may have only testing or only stable.  Apt will only resolve
packages that it finds in the Packages.gz files, which are located
under specific distribution directories:

	ftp://mirror/pub/debian/dists/stable/main/binary-i386/Packages.gz

corresponds to
	
	deb ftp://mirror/pub/debian stable main

Now, if you want to list multiple distributions in your sources.list
file but pick and choose which package to install, you need to use
"pinning" from the /etc/apt/preferences file.

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

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

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

This would set up a priority of stable packages over all else, but allow
some priority to testing packages.  Unstable would be ignored unless you
specify it on the commandline:

	apt-get install kernel-source-2.4.9/unstable

(If it existed in unstable.)

You can also use the preferences file to specify certain packages to
ALWAYS track from unstable.  Since I like galeon, I need mozilla.  I
need to list all of the packages that I want to track from unstable
because my default (at work) is to track testing:

	Package: mozilla
	Pin: release a=unstable
	Pin-Priority: 998

	Package: mozilla-browser
	Pin: release a=unstable
	Pin-Priority: 998

	Package: mozilla-mailnews
	Pin: release a=unstable
	Pin-Priority: 998

	Package: mozilla-psm
	Pin: release a=unstable
	Pin-Priority: 998

	Package: galeon
	Pin: release a=unstable
	Pin-Priority: 998

	Package: libnss3
	Pin: release a=unstable
	Pin-Priority: 998

	Package: libnspr4
	Pin: release a=unstable
	Pin-Priority: 998

READ MORE: apt_preferences(5), found via man -k apt.

-- 
Chad Walstrom <chewie at wookimus.net>                 | a.k.a. ^chewie
http://www.wookimus.net/                            | s.k.a. gunnarr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://shadowknight.real-time.com/pipermail/tclug-list/attachments/20020607/32058873/attachment.pgp