l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
September 2: Social gathering
Next Installfest:
TBD
Latest News:
Aug. 18: Discounts to "Velocity" in NY; come to tonight's "Photography" talk
Page last updated:
2002 Jun 19 02:57

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
[vox-tech] HOWTO: mix potato and woody entries in apt sources.list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vox-tech] HOWTO: mix potato and woody entries in apt sources.list



On Tue, Jun 18, 2002 at 07:30:14PM -0700, Doug Huckaba wrote:
> Thank you so much. That was the most coherent response to an e-mail I've 
> received in about 6 months. That's not to say that receive poor responses 
> on this list, I rarely post here as I usually learn more just from reading 
> other responses. 

Doug,

  I must have omitted the usual grammar typos in my last message,
I have a bad habit of only spell checking (not proof reading) my
replies... I have to followup my X post because a sentence in the
one of the footnotes was all mangled and makes no sense.

  I was surprised no one else had replied by now.  :)


> > On Wed, Jun 12, 2002 at 06:00:18PM -0700, Doug Huckaba wrote:
> > > for example: application-1.0 is installed from potato, then the woody
> > > dist-upgrade installs application-2.0, then application 1.5 is 
> > > 'released'
[...]
> >   For what it's worth you can have both each of testing and unstable 
> > both in your sources.list file, and with the use of /etc/apt/preferences
> > have the apt command set default to testing, but on the command line when
> > doing an install you can request the package from unstable...
[...]
> >   I have not used preferences to pin a version before... so I don't have
> > syntax examples to paste.

  Btw: I have barely tested out some pin operations here is what I think
is the most useful set of examples.

  The readers who attend meetings should try to blink alot so that there
will be something to cover if I ever do a talk on debian package management 
tools.  =)

  With a command reference handout and map of directions to the mailing 
list I think I could cover most of this information in a 10 minute 
timeslot at one of the meetings.  It might cut down on things like
the short but animated "which distribution is best" religious feud at 
the last meeting.  ;)



cat /etc/apt/preferences
====
Package: *
Pin: release testing
====

cat /etc/apt/sources.list
====
# local debian mirror
# deb http://192.168.1.101/debian/ woody main contrib non-free
# deb http://192.168.1.101/debian/non-US woody/non-US main contrib non-free

# potato release
deb http://http.us.debian.org/debian woody main contrib non-free
deb http://non-us.debian.org/debian-non-US woody/non-US main contrib non-free
deb http://security.debian.org woody/updates main contrib non-free

# woody release
deb http://http.us.debian.org/debian sid main contrib non-free
deb http://non-us.debian.org/debian-non-US sid/non-US main contrib non-free

# source lines
deb-src http://http.us.debian.org/debian unstable main contrib non-free
deb-src http://non-us.debian.org/debian-non-US unstable/non-US main contrib non-free
====


  I am going to run a series of things with the '-s' option which will
show what would be done but will take no action.  When pasting drop the
-s if you want action taken...

  After running "apt-get update" to pull the package lists... 
you can install a simple package from the unstable branch like so,
(but note that this syntax will not work on complex packages
as you can see below):

apt-get -s install vim/unstable
====
Reading Package Lists... Done
Building Dependency Tree... Done
Selected version 6.1.048-1 (Debian:unstable) for vim
The following packages will be upgraded
  vim
1 packages upgraded, 0 newly installed, 0 to remove and 0  not upgraded.
Inst vim (6.1.048-1 Debian:unstable)
Conf vim (6.1.048-1 Debian:unstable)
====


  You can see I already have vim installed from testing and an attempt
to install without specifying version wants the testing version and 
will do nothing.

apt-get -s install vim
====
Reading Package Lists... Done
Building Dependency Tree... Done
Sorry, vim is already the newest version.
0 packages upgraded, 0 newly installed, 0 to remove and 0  not upgraded.
====


  On this system I don't have mozilla installed, here is what happen
if I try to install, notice that it pulls the version "0.9.9-6" from
testing release of things:

apt-get -s install mozilla
====
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
  libgtk1.2 libgtk1.2-common libjpeg62 libnspr4 libnss3 mozilla-browser
  mozilla-mailnews mozilla-psm
The following NEW packages will be installed:
  libgtk1.2 libgtk1.2-common libjpeg62 libnspr4 libnss3 mozilla
  mozilla-browser mozilla-mailnews mozilla-psm
0 packages upgraded, 9 newly installed, 0 to remove and 0  not upgraded.
Inst libgtk1.2-common (1.2.10-11 Debian:testing)
Inst libgtk1.2 (1.2.10-11 Debian:testing)
Inst libjpeg62 (6b-5 Debian:testing)
Inst libnspr4 (2:0.9.9-6 Debian:testing)
Inst libnss3 (2:0.9.9-6 Debian:testing)
Inst mozilla-browser (2:0.9.9-6 Debian:testing)
Inst mozilla-mailnews (2:0.9.9-6 Debian:testing)
Inst mozilla-psm (2:0.9.9-6 Debian:testing)
Inst mozilla (2:0.9.9-6 Debian:testing)
Conf libgtk1.2-common (1.2.10-11 Debian:testing)
Conf libgtk1.2 (1.2.10-11 Debian:testing)
Conf libjpeg62 (6b-5 Debian:testing)
Conf libnspr4 (2:0.9.9-6 Debian:testing)
Conf libnss3 (2:0.9.9-6 Debian:testing)
Conf mozilla-browser (2:0.9.9-6 Debian:testing)
Conf mozilla-mailnews (2:0.9.9-6 Debian:testing)
Conf mozilla-psm (2:0.9.9-6 Debian:testing)
Conf mozilla (2:0.9.9-6 Debian:testing)
====


  Now for whatever reason I know I want a newer mozilla, with
the following command I will pull "1.0.0-2" from unstable.

apt-get -t unstable -s install mozilla
====
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
  libgtk1.2 libgtk1.2-common libnspr4 libnss3 mozilla-browser mozilla-mailnews
  mozilla-psm
The following NEW packages will be installed:
  libgtk1.2 libgtk1.2-common libnspr4 libnss3 mozilla mozilla-browser
  mozilla-mailnews mozilla-psm
0 packages upgraded, 8 newly installed, 0 to remove and 79  not upgraded.
Inst libgtk1.2-common (1.2.10-12 Debian:unstable)
Inst libgtk1.2 (1.2.10-12 Debian:unstable)
Inst libnspr4 (2:1.0.0-3 Debian:unstable)
Inst libnss3 (2:1.0.0-3 Debian:unstable)
Inst mozilla-browser (2:1.0.0-3 Debian:unstable)
Inst mozilla-mailnews (2:1.0.0-3 Debian:unstable)
Inst mozilla-psm (2:1.0.0-3 Debian:unstable)
Inst mozilla (2:1.0.0-3 Debian:unstable)
Conf libgtk1.2-common (1.2.10-12 Debian:unstable)
Conf libgtk1.2 (1.2.10-12 Debian:unstable)
Conf libnspr4 (2:1.0.0-3 Debian:unstable)
Conf libnss3 (2:1.0.0-3 Debian:unstable)
Conf mozilla-browser (2:1.0.0-3 Debian:unstable)
Conf mozilla-mailnews (2:1.0.0-3 Debian:unstable)
Conf mozilla-psm (2:1.0.0-3 Debian:unstable)
Conf mozilla (2:1.0.0-3 Debian:unstable)
====


  This is an example of how that syntax I used for vim will not
work for "complex" packages.  So unless you know what you are
doing I recommend using the "-t" option from the previous example...

apt-get -s install mozilla/unstable
====
Reading Package Lists... Done
Building Dependency Tree... Done
Selected version 2:1.0.0-3 (Debian:unstable) for mozilla
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:

Sorry, but the following packages have unmet dependencies:
  mozilla: Depends: mozilla-browser (= 2:1.0.0-3)
           Depends: mozilla-mailnews (= 2:1.0.0-3) but 2:0.9.9-6 is to be installed
           Depends: mozilla-psm (= 2:1.0.0-3) but 2:0.9.9-6 is to be installed
E: Sorry, broken packages
====


  Also for what it's worth if there is really only one version available
it will prefer the one found at the top of of the sources.list file
first.  So you should put testing then unstable in your sources list
not the other way around.  Here is an example of installing a package
that only one version exists... even though I asked for unstable it
selected testing because the same file version is in both releases,
and testing is my preferred source.

apt-get -s install netselect/unstable
====
Reading Package Lists... Done
Building Dependency Tree... Done
Selected version 0.3-4 (Debian:testing) for netselect
The following NEW packages will be installed:
  netselect
0 packages upgraded, 1 newly installed, 0 to remove and 0  not upgraded.
Inst netselect (0.3-4 Debian:testing)
Conf netselect (0.3-4 Debian:testing)
====


  Using the following command you can get a list of available versions
of a package and the source which would be used:

apt-cache showpkg mozilla | perl -ne 'm/^\W+$/ and exit 0; print'
====
Package: mozilla
Versions:
2:1.0.0-3(/var/lib/apt/lists/http.us.debian.org_debian_dists_sid_main_binary-i386_Packages)
2:0.9.9-6(/var/lib/apt/lists/http.us.debian.org_debian_dists_woody_main_binary-i386_Packages)
====


  The other route of finding which versions are available are
with apt-cache show, but you need to specify the -a option to
see all versions, this is the output for a package with only
one version, but it's human readable and there would simply
be a second entry for like this if two versions were available:

apt-cache -a show netselect
====
Package: netselect
Priority: optional
Section: net
Installed-Size: 57
Maintainer: Avery Pennarun <apenwarr@debian.org>
Architecture: i386
Version: 0.3-4
Depends: libc6 (>= 2.2.4-4)
Recommends: wget
Conflicts: suidmanager (<< 0.50)
Filename: pool/main/n/netselect/netselect_0.3-4_i386.deb
Size: 18910
MD5sum: 5cb275cb607a5a3a2f99a481c935641d
Description: Choose the fastest server automatically.
 This is netselect, an ultrafast intelligent parallelizing binary-search
 implementation of "ping."  You give it a (possibly very long) list of
 servers, and it chooses the fastest/closest one automatically.  It's good
 for finding the fastest ftp.debian.org mirror, the least laggy IRC server,
 or the best Squid neighbour.
 .
 This version also includes netselect-apt, which creates an apt sources.list
 file automatically from the huge list of Debian mirrors.
====
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.