<DIV><FONT size=2>
<P><BR>Hi,</P>
<P>Since there were at least some people who were interested in my<BR>experiences as a new Debian user (with a fair amount of experience in<BR>other unix systems Redhat, sun, ibm). I figured I would post another<BR>problem I had with Debian. I would say that this problem was mostly<BR>my fault, but if you read the problem you'll see that it was fairly<BR>easy to fall into this trap. Before you ask, I read the documentation<BR>or at least a fair amount of it. I don't think anyone literally reads<BR>the pages and pages of documentation out there. If you were required<BR>to read and completely understand all the documentation about any<BR>operationing system before installing it, nobody would ever be able to<BR>install any operating system. Documentation is mainly a guide that<BR>you use in conjunction with your own common sense to solve problems.<BR>BTW, the apt HOWTO is actually very good -<BR><A href="http://www.debian.org/doc/manuals/apt-howto/index.en.html">http://www.debian.org/doc/manuals/apt-howto/index.en.html</A></P>
<P>So I am working with my standard installation of Debian woody (3.0r1). The<BR>first thing I wanted to do was get some testing versions of certain<BR>software installed. I modified my sources.list file to be the<BR>following to add the appropriate testing elements. Then I would type<BR>"apt-get -t testing install gv". It didn't work even though I had the<BR>appropriate elements in my sources.list file. The sources.list file I<BR>used was:</P>
<P>deb <A href="http://ftp.us.debian.org/debian/">http://ftp.us.debian.org/debian/</A> stable main non-free contrib<BR>deb-src <A href="http://ftp.us.debian.org/debian/">http://ftp.us.debian.org/debian/</A> stable main non-free contrib<BR>deb <A href="http://non-us.debian.org/debian-non-US">http://non-us.debian.org/debian-non-US</A> stable/non-US main contrib<BR>non-free deb-src <A href="http://non-us.debian.org/debian-non-US">http://non-us.debian.org/debian-non-US</A> stable/non-US<BR>main contrib non-free</P>
<P>deb <A href="http://security.debian.org/">http://security.debian.org/</A> stable/updates main contrib non-free</P>
<P>deb <A href="http://ftp.us.debian.org/debian/">http://ftp.us.debian.org/debian/</A> testing main non-free contrib<BR>deb-src <A href="http://ftp.us.debian.org/debian/">http://ftp.us.debian.org/debian/</A> testing main non-free contrib<BR>deb <A href="http://non-us.debian.org/debian-non-US">http://non-us.debian.org/debian-non-US</A> testing/non-US main contrib<BR>non-free deb-src <A href="http://non-us.debian.org/debian-non-US">http://non-us.debian.org/debian-non-US</A> testing/non-US<BR>main contrib non-free</P>
<P>BTW, another file Debian sometimes uses is apt.conf. That file didn't<BR>exist in my installation of woody. So I had created one with a single<BR>entry:</P>
<P>APT::Default-Release "stable";</P>
<P><BR>The problem that I had was in my mental model of how Debian apt-get<BR>works. I thought it if it got an install request it would look at the<BR>sources.list file and get whatever you need. This is not correct. I<BR>also thought that an update would update your current version. An<BR>upgrade would take you to the next version (testing in my case). And<BR>that dist-upgrade was the same as an upgrade (what would you upgrade<BR>if it wasn't a distribution?). BTW, I was only using the "apt-get -t"<BR>commands and the graphical package updater, not the update/upgrade<BR>commands. This seems to me to be the way most people, even computer<BR>people, would view these terms. This is *not* the way Debian works<BR>either.</P>
<P>Now for the way Debian apt-get works. When you execute an apt-get<BR>command it never looks at your sources.list (except for one<BR>counterexample I will give). It actually looks at a package archive<BR>it contructs located in /var. It treats that list in /var as<BR>equivalent to the upstream packages. If there is a difference between<BR>that archive and your current package, it downloads the package. The<BR>way Debian apt-get interprets update, upgrade, and dist-upgrade is the<BR>following:</P>
<P>update => Make the current /var package archive list consistent with<BR>sites listed in the current /etc/apt/sources.list. So apt-get update<BR>is the only command that looks at your sources.list. Everytime you<BR>change sources.list you must run this command.</P>
<P>upgrade => Updates the current release on your computer to the most<BR>recent version of the current release on your computer</P>
<P>dist-upgrade => Upgrades the current distribution to the next one<BR>(i.e. 3.0 to 4.0/stable to testing)</P>
<P>So my mistake was thinking that apt-get read the sources.list file<BR>every time you execute an apt-get command. It really reads the<BR>package archive on /var. That package archive doesn't contain entries<BR>for the testing versions until you run apt-get update. It might help<BR>the apt-get HOWTO if in the introduction they gave a clearer model of<BR>how apt-get works.</P>
<P>Now Debian experts like Ben may say "RTFM, you idiot" (and I do think<BR>he is an expert, many people who are actually experts at something<BR>will not say they are, alot of times people who say are experts really<BR>are just talk). He may not say that, I don't know. I have admitted<BR>that this is mostly my fault, and that's true. And it only took me an<BR>hour or so to figure out the problem. After realizing what I have, I<BR>read the APT HOWTO more carefully and this is documented (it isn't<BR>that strongly emphasized though). I think any blame on me is somewhat<BR>mitigated by what I think is a questionable use of terminology by<BR>Debian apt-get. This problem may actually be historical (i.e. someone<BR>made this decision a long time ago and they are stuck with it). I<BR>also think that the software design is correct, the way they design it<BR>if you run an upgrade and don't have any packages to update, it<BR>doesn't hit the network. My problem is merely with the terminology.<BR>If someone using Redhat 8.0 told you he "upgraded" his system,<BR>wouldn't you think he meant that he is now running Redhat 9.0 ? I<BR>would think that. But if he told me he "updated" his system, I would<BR>think he got the most recent version of Redhat 8.0. This is not how<BR>Debian apt-get is, so be careful.</P>
<P><BR>There is second small problem with the version of apt-get that is<BR>given in woody. You may wonder in my sources.list file I gave why I<BR>didn't just add the unstable entries to it. That way, I could get<BR>whatever I wanted via "apt-get -t" and do upgrades to get the current<BR>stable base. When I added the entries for unstable, it gave an error.<BR>The error is recognized and solved already by the Debian people. But<BR>the corrected version of apt is currently in unstable. If you get the<BR>unstable version of apt, you can use the following sources.list (which<BR>is my current one):</P>
<P><BR>deb <A href="http://ftp.us.debian.org/debian/">http://ftp.us.debian.org/debian/</A> stable main non-free contrib<BR>deb-src <A href="http://ftp.us.debian.org/debian/">http://ftp.us.debian.org/debian/</A> stable main non-free contrib<BR>deb <A href="http://non-us.debian.org/debian-non-US">http://non-us.debian.org/debian-non-US</A> stable/non-US main contrib<BR>non-free deb-src <A href="http://non-us.debian.org/debian-non-US">http://non-us.debian.org/debian-non-US</A> stable/non-US<BR>main contrib non-free</P>
<P>deb <A href="http://security.debian.org/">http://security.debian.org/</A> stable/updates main contrib non-free</P>
<P>deb <A href="http://ftp.us.debian.org/debian/">http://ftp.us.debian.org/debian/</A> testing main non-free contrib<BR>deb-src <A href="http://ftp.us.debian.org/debian/">http://ftp.us.debian.org/debian/</A> testing main non-free contrib<BR>deb <A href="http://non-us.debian.org/debian-non-US">http://non-us.debian.org/debian-non-US</A> testing/non-US main contrib<BR>non-free deb-src <A href="http://non-us.debian.org/debian-non-US">http://non-us.debian.org/debian-non-US</A> testing/non-US<BR>main contrib non-free</P>
<P>deb <A href="http://ftp.us.debian.org/debian/">http://ftp.us.debian.org/debian/</A> unstable main non-free contrib<BR>deb-src <A href="http://ftp.us.debian.org/debian/">http://ftp.us.debian.org/debian/</A> unstable main non-free<BR>contrib deb <A href="http://non-us.debian.org/debian-non-US">http://non-us.debian.org/debian-non-US</A> unstable/non-US<BR>main contrib non-free deb-src <A href="http://non-us.debian.org/debian-non-US">http://non-us.debian.org/debian-non-US</A><BR>unstable/non-US main contrib non-free</P>
<P>Remember to run "apt-get update" every time you change your<BR>sources.list file. Then it should work.</P>
<P>I would also like to add that just because I find a few things<BR>slightly wrong or counterintuitive, it doesn't mean that Debian is not<BR>a good distribution. Problems do exist in Redhat, that's why they<BR>have updates/upgrades too. That doesn't mean Redhat is a bad<BR>distribution. The small second problem with apt-get woody really<BR>isn't a problem if you are just running stable (for a server). In<BR>that case, you will only want stable upgrades (updates) anyway so it<BR>is not a bug in woody, technically. It's just a problem for people<BR>like me who just installed Debian and are getting used to it and want<BR>the option to check out stable/testing/unstable packages.</P>
<P>And something else for Ken or others, today I just found a good guide.<BR>So if you are curious about the Debian install process get the guide<BR>at <A href="http://www.debian.org/doc/user-manuals#usersguide">http://www.debian.org/doc/user-manuals#usersguide</A><BR>(dwarfs-debian-guide). You don't have to bother with the whole thing,<BR>it is 300 pages or so. Pages 86-180 or so give screenshots of the<BR>install process. The information may be a little dated (documentation<BR>is always behind), but it should give you a good idea of the process.</P>
<P>Another minor note - at one point I recommended that people use the<BR>graphical installer when getting new packages for Debian. I don't<BR>know if this such a good idea (at least for woody distribution). When<BR>Debian installs a package for you, it usually asks some questions<BR>about how the package should be configured. They have a "Dialog"<BR>routine that is responsible for asking those questions. If you use<BR>the graphical installer (the one for KDE at least), it is unable to<BR>run the Dialog routines, and therefore unable to ask you configuration<BR>questions. It still installs the package, but you want to be careful<BR>in case one of the questions is answered in a way you don't like. You<BR>can always just uninstall and reinstall the package if there are<BR>problems or there may be a command (dpkg-reconfigure ??). My<BR>recommendation is to use the graphical installer to see the packages<BR>available, but use apt-get at the command line for actual install so<BR>the Dialog questions get asked.</P>
<P>Also the Debian practice of asking installation questions for some of<BR>the packages it installs is a difference with respect to Redhat.<BR>Redhat asks far fewer questions (if any) when you install some<BR>package. Redhat makes default choices for you. I think I like the<BR>Debian approach better on this issue (although the main type of<BR>questions I am getting now are just about my fonts, which I mostly<BR>don't care about). I think that for sysadmins it allows for easier<BR>and more flexible configuration. I am sure Debian won't ask all the<BR>questions necessary for a complicated system, but it does help and it<BR>sometimes tells file locations and other information. Obviously, you<BR>need to know alot about the configuration files in any package to do a<BR>good install. Debian won't do it all, but it helps. If Debian had a<BR>way to specify a default answer for the Dialog questions, it might be<BR>nice for normal users who don't want to be bothered. But it wouldn't<BR>be sufficient to say default=yes, because some of the Dialog questions<BR>actually are set to answer no (if you just hit return). That way<BR>Debian would have a standard installation (for normal users) and be<BR>configurable (for experts who would answer the Dialog questions).<BR>They may actually already have this feature and I just haven't<BR>bothered to look.</P>
<P><BR>In case you are curious, I won't literally be posting all of the<BR>mistakes I make in Debian. Most of them are just my fault as this one<BR>was. And really there aren't that many problems at all, and I<BR>actually think I have posted the vast majority of what I ran into. I<BR>just think this one might be a little tricky for new users (even<BR>experienced unix new users of Debian).</P>
<P><BR>Later,</P>
<P> </P>
<P>Bill Gooding</P>
<P> </P></FONT></DIV><p><hr SIZE=1>
Do you Yahoo!?<br>
<a href="http://us.rd.yahoo.com/search/mailsig/*http://search.yahoo.com">The New Yahoo! Search</a> - Faster. Easier. Bingo.