[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dist-upgrade and sources.list



On Wed, Jun 08, 2005 at 02:55:47AM -0700, Basajaun wrote:
> My impression (correct me if I'm wrong) is that whatever sources you
> put in "sources.list" have nothing to do with the version of Debian you
> are running. Those lines only tell apt-get where to look for the
> packages, but apt-get will ignore the ones not matching your version.

Not true. It will download the list of updated packages from each
valid line. If you have one line with woody, one with sarge, one with
etch and one with sid then apt will download four package lists.

> Actually, while writing this post, I have read "man apt_preferences",
> and I am still digesting it... anyway...

Keep digesting. It is good stuff. ;-)

> What this means is that if I put "sarge" or "stable" (both are synonyms
> now)  where I had "testing", my system will continue updating
> "correctly", but even if I keep "testing" as sources (which would be
> inappropriate for my box now), no harm will be done: apt-get will
> simply look only in the directories I provide (testing ones), and
> conclude that the stuff there corresponds to Debian 3.2 Etch, not
> Debian 3.1 Sarge, and  downright ignore it, telling me that 0
> updateable packages where found, isn't it so?

No. But I'm not sure what you mean with the directories that you
provide. I have the following line in sources.list:

deb ftp://download.xs4all.nl/pub/mirror/debian/ sarge main contrib non-free

That's a site in The Netherlands. You probably want another one.


"Shouldn't there be a line for the security updates?"

"Oops, absolutely. Thanks for asking." ;-)

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

But all valid lines in your sources.list will lead to an update of an
available package list. What you really want to do is explicitly tell
apt which distribution you want to track. By default only packages for
that distro will get upgraded. See below.

> The second question is the use of "apt-get dist-upgrade". Say I am
> running Debian 3.1 Sarge (stable), and I want to upgrade to Debian 3.2
> Etch (testing)... how does apt-get know it has to upgrade me to Etch,
> and not Sid? It always upgrades stepwise (stable -> testing -> etch)?

Look at the manual page of /etc/apt.conf:

man apt.conf

Actually I fail to see the info I am looking for there. Ah, it is in
the apt_preferences man page you mentioned. The point of interest here
is the Default-Release line.  Put sarge or stable there. And if you
want to track the new testing distro put etch or testing there. I
think you can either handle it in the apt.conf or in the preferences
file.  Here is my /etc/apt.conf (I have no preferences file
currently):

APT
{
        Default-Release "sarge";
        Cache-Limit 20000000;
        Cache::Important Yes;
        ExtractTemplates::TempDir /var/tmp;
};
DSELECT
{
        Clean never;
};

BTW, I actually still had

        Default-Release "testing";

there, which explains some unexplained behaviour I was getting. :)

And on dist-upgrade: this is not meant just to upgrade to a new
distribution. I used to think that too. It is a more thorough (and
possibly more dangerous) method of upgrading. Say you have package-a
version 1 installed, with no dependencies. A new version 2 becomes
available, which has a new dependency on package-b, which you don't
yet have installed. An 'apt upgrade' will do nothing. An 'apt
dist-upgrade' will upgrade package-a from version 1 to version 2 and
will install package-b.

See the man page for apt-get.

HTH,

-- 
Maurits van Rees | http://maurits.vanrees.org/ [Dutch/Nederlands] 
Public GnuPG key: keyserver.net ID 0x1735C5C2
"Let your advance worrying become advance thinking and planning."
 - Winston Churchill

Attachment: signature.asc
Description: Digital signature


Reply to: