[TriLUG] Debian operaton.

Bill Gooding bgood210 at yahoo.com
Sat May 24 14:22:12 EDT 2003



Hi,

Since there were at least some people who were interested in my
experiences as a new Debian user (with a fair amount of experience in
other unix systems Redhat, sun, ibm).  I figured I would post another
problem I had with Debian.  I would say that this problem was mostly
my fault, but if you read the problem you'll see that it was fairly
easy to fall into this trap.  Before you ask, I read the documentation
or at least a fair amount of it.  I don't think anyone literally reads
the pages and pages of documentation out there.  If you were required
to read and completely understand all the documentation about any
operationing system before installing it, nobody would ever be able to
install any operating system.  Documentation is mainly a guide that
you use in conjunction with your own common sense to solve problems.
BTW, the apt HOWTO is actually very good -
http://www.debian.org/doc/manuals/apt-howto/index.en.html

So I am working with my standard installation of Debian woody (3.0r1).  The
first thing I wanted to do was get some testing versions of certain
software installed.  I modified my sources.list file to be the
following to add the appropriate testing elements.  Then I would type
"apt-get -t testing install gv".  It didn't work even though I had the
appropriate elements in my sources.list file.  The sources.list file I
used was:

deb http://ftp.us.debian.org/debian/ stable main non-free contrib
deb-src http://ftp.us.debian.org/debian/ stable main non-free contrib
deb http://non-us.debian.org/debian-non-US stable/non-US main contrib
non-free deb-src http://non-us.debian.org/debian-non-US stable/non-US
main contrib non-free

deb http://security.debian.org/ stable/updates main contrib non-free

deb http://ftp.us.debian.org/debian/ testing main non-free contrib
deb-src http://ftp.us.debian.org/debian/ testing main non-free contrib
deb http://non-us.debian.org/debian-non-US testing/non-US main contrib
non-free deb-src http://non-us.debian.org/debian-non-US testing/non-US
main contrib non-free

BTW, another file Debian sometimes uses is apt.conf.  That file didn't
exist in my installation of woody.  So I had created one with a single
entry:

APT::Default-Release "stable";


The problem that I had was in my mental model of how Debian apt-get
works.  I thought it if it got an install request it would look at the
sources.list file and get whatever you need.  This is not correct.  I
also thought that an update would update your current version.  An
upgrade would take you to the next version (testing in my case).  And
that dist-upgrade was the same as an upgrade (what would you upgrade
if it wasn't a distribution?).  BTW, I was only using the "apt-get -t"
commands and the graphical package updater, not the update/upgrade
commands.  This seems to me to be the way most people, even computer
people, would view these terms.  This is *not* the way Debian works
either.

Now for the way Debian apt-get works.  When you execute an apt-get
command it never looks at your sources.list (except for one
counterexample I will give).  It actually looks at a package archive
it contructs located in /var.  It treats that list in /var as
equivalent to the upstream packages.  If there is a difference between
that archive and your current package, it downloads the package.  The
way Debian apt-get interprets update, upgrade, and dist-upgrade is the
following:

update => Make the current /var package archive list consistent with
sites listed in the current /etc/apt/sources.list. So apt-get update
is the only command that looks at your sources.list.  Everytime you
change sources.list you must run this command.

upgrade => Updates the current release on your computer to the most
recent version of the current release on your computer

dist-upgrade => Upgrades the current distribution to the next one
(i.e. 3.0 to 4.0/stable to testing)

So my mistake was thinking that apt-get read the sources.list file
every time you execute an apt-get command.  It really reads the
package archive on /var.  That package archive doesn't contain entries
for the testing versions until you run apt-get update. It might help
the apt-get HOWTO if in the introduction they gave a clearer model of
how apt-get works.

Now Debian experts like Ben may say "RTFM, you idiot" (and I do think
he is an expert, many people who are actually experts at something
will not say they are, alot of times people who say are experts really
are just talk).  He may not say that, I don't know.  I have admitted
that this is mostly my fault, and that's true.  And it only took me an
hour or so to figure out the problem.  After realizing what I have, I
read the APT HOWTO more carefully and this is documented (it isn't
that strongly emphasized though).  I think any blame on me is somewhat
mitigated by what I think is a questionable use of terminology by
Debian apt-get.  This problem may actually be historical (i.e. someone
made this decision a long time ago and they are stuck with it).  I
also think that the software design is correct, the way they design it
if you run an upgrade and don't have any packages to update, it
doesn't hit the network.  My problem is merely with the terminology.
If someone using Redhat 8.0 told you he "upgraded" his system,
wouldn't you think he meant that he is now running Redhat 9.0 ?  I
would think that.  But if he told me he "updated" his system, I would
think he got the most recent version of Redhat 8.0.  This is not how
Debian apt-get is, so be careful.


There is second small problem with the version of apt-get that is
given in woody.  You may wonder in my sources.list file I gave why I
didn't just add the unstable entries to it.  That way, I could get
whatever I wanted via "apt-get -t" and do upgrades to get the current
stable base.  When I added the entries for unstable, it gave an error.
The error is recognized and solved already by the Debian people.  But
the corrected version of apt is currently in unstable.  If you get the
unstable version of apt, you can use the following sources.list (which
is my current one):


deb http://ftp.us.debian.org/debian/ stable main non-free contrib
deb-src http://ftp.us.debian.org/debian/ stable main non-free contrib
deb http://non-us.debian.org/debian-non-US stable/non-US main contrib
non-free deb-src http://non-us.debian.org/debian-non-US stable/non-US
main contrib non-free

deb http://security.debian.org/ stable/updates main contrib non-free

deb http://ftp.us.debian.org/debian/ testing main non-free contrib
deb-src http://ftp.us.debian.org/debian/ testing main non-free contrib
deb http://non-us.debian.org/debian-non-US testing/non-US main contrib
non-free deb-src http://non-us.debian.org/debian-non-US testing/non-US
main contrib non-free

deb http://ftp.us.debian.org/debian/ unstable main non-free contrib
deb-src http://ftp.us.debian.org/debian/ unstable main non-free
contrib deb http://non-us.debian.org/debian-non-US unstable/non-US
main contrib non-free deb-src http://non-us.debian.org/debian-non-US
unstable/non-US main contrib non-free

Remember to run "apt-get update" every time you change your
sources.list file. Then it should work.

I would also like to add that just because I find a few things
slightly wrong or counterintuitive, it doesn't mean that Debian is not
a good distribution.  Problems do exist in Redhat, that's why they
have updates/upgrades too.  That doesn't mean Redhat is a bad
distribution.  The small second problem with apt-get woody really
isn't a problem if you are just running stable (for a server).  In
that case, you will only want stable upgrades (updates) anyway so it
is not a bug in woody, technically.  It's just a problem for people
like me who just installed Debian and are getting used to it and want
the option to check out stable/testing/unstable packages.

And something else for Ken or others, today I just found a good guide.
So if you are curious about the Debian install process get the guide
at http://www.debian.org/doc/user-manuals#usersguide
(dwarfs-debian-guide).  You don't have to bother with the whole thing,
it is 300 pages or so.  Pages 86-180 or so give screenshots of the
install process.  The information may be a little dated (documentation
is always behind), but it should give you a good idea of the process.

Another minor note - at one point I recommended that people use the
graphical installer when getting new packages for Debian.  I don't
know if this such a good idea (at least for woody distribution).  When
Debian installs a package for you, it usually asks some questions
about how the package should be configured.  They have a "Dialog"
routine that is responsible for asking those questions.  If you use
the graphical installer (the one for KDE at least), it is unable to
run the Dialog routines, and therefore unable to ask you configuration
questions.  It still installs the package, but you want to be careful
in case one of the questions is answered in a way you don't like.  You
can always just uninstall and reinstall the package if there are
problems or there may be a command (dpkg-reconfigure ??).  My
recommendation is to use the graphical installer to see the packages
available, but use apt-get at the command line for actual install so
the Dialog questions get asked.

Also the Debian practice of asking installation questions for some of
the packages it installs is a difference with respect to Redhat.
Redhat asks far fewer questions (if any) when you install some
package.  Redhat makes default choices for you.  I think I like the
Debian approach better on this issue (although the main type of
questions I am getting now are just about my fonts, which I mostly
don't care about).  I think that for sysadmins it allows for easier
and more flexible configuration.  I am sure Debian won't ask all the
questions necessary for a complicated system, but it does help and it
sometimes tells file locations and other information.  Obviously, you
need to know alot about the configuration files in any package to do a
good install.  Debian won't do it all, but it helps.  If Debian had a
way to specify a default answer for the Dialog questions, it might be
nice for normal users who don't want to be bothered.  But it wouldn't
be sufficient to say default=yes, because some of the Dialog questions
actually are set to answer no (if you just hit return).  That way
Debian would have a standard installation (for normal users) and be
configurable (for experts who would answer the Dialog questions).
They may actually already have this feature and I just haven't
bothered to look.


In case you are curious, I won't literally be posting all of the
mistakes I make in Debian.  Most of them are just my fault as this one
was.  And really there aren't that many problems at all, and I
actually think I have posted the vast majority of what I ran into.  I
just think this one might be a little tricky for new users (even
experienced unix new users of Debian).


Later,

 

Bill Gooding

 



---------------------------------
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.trilug.org/pipermail/trilug/attachments/20030524/9b4d5ef4/attachment.html>


More information about the TriLUG mailing list