2

I have generated a sources.list file from http://debgen.simplylinux.ch/ with the following parameters:

  • Country: New Zealand
  • Release: Stable (Wheezy)
  • Architecture: 64 bits
  • Sources: Main + Security + Updates
  • Include source package: No

The output I get is:

deb http://ftp.nz.debian.org/debian stable main    
deb http://ftp.debian.org/debian/ wheezy-updates main    
deb http://security.debian.org/ wheezy/updates main

My questions are:

  1. Observation: The 'base' source (line 1) points to my local repository (NZ) but the wheezy-updates source (line 2) points to the main repository (US?).

    Question: Is there any good reason why they cannot both point to my local (NZ) repository? Possible reasons I can assume are that the NZ repository does not contain the wheezy-updates, or that the main repository releases them earlier than the NZ mirror.

  2. Observation: Line URL in line 2 ends with a trailing slash, compared with the URL in line 1 that does not.

    Question: Is the trailing slash required or important for either line 1 or 2?

  3. Observation: The order of the lines goes:

    1. Base installation source
    2. Base updates source (my understanding is this used to be called volatile?)
    3. Security updates source

    Question: Is the order of the lines really all that important? I read here that:

    "It is important to list sources in order of preference, with the most preferred source listed first. Typically this will result in sorting by speed from fastest to slowest (CD-ROM followed by hosts on a local network, followed by distant Internet hosts, for example)."

    However, I would have thought that the security updates were more important, so would go on line 1. Or is is really not that much of an issue?

1
  1. Apparently, is a misconfiguration of the script generator, the NZ servers has wheezy-updates:

    http://ftp.nz.debian.org/debian/dists/wheezy-updates/

    Since is an error, your next questions are answered too.

  2. If I have to guess, this (maybe) has something to do with the first problem. But, IMO, apt adds a trailing slash / always. Servers doesn't nags about it // = /.

  3. This only applies to packages that are share the same name and version. Example, your company builds some optimized packages (they has their sources intact), no new version should really be done. You just add your company repository to the top, when you want to install that package, it prefers your company server.

    For versions, APT will always select the higher version available. So, you can leave security to the end, packages there are newer than main and/or updates. APT will prefer the higher version that will be either updates or security.

  • Thank you @Braiam, that explains Q3 and partially Q2 for me. Regarding Q1, when I used the generated sources.list as shown, I don't get any apt-get update errors, so I assume ftp.nz.debian.org/debian stable main has a soft link on the mirror that points to ftp.nz.debian.org/debian/dists/wheezy-updates. But I am still curious to understand why line 1 and 2 should be different mirrors (NZ line 1, and US line 2) rather than the same one. – Toby Nov 9 '13 at 3:30
  • @Toby the error is the script generator. The resultant file is a-OK but the script either doesn't know that NZ also have -updates and fallback to US mirror or the way they have to know whenever a mirror has an determinated distribuition. – Braiam Nov 9 '13 at 3:37
  • you are right. I just tried adding the 'nz' subdomain to line 2 to read deb ftp.nz.debian.org/debian wheezy-updates main and 'apt-get update' completed without error. Many thanks! – Toby Nov 9 '13 at 4:03
2

I know this Q&A is old, but FWIW there is no longer any real value in hardcoding your closest mirror in the hope of getting the fastest possible performance.

If you use http://httpredir.debian.org/debian as the repo URL it will auto direct you to the best mirror for you (which may not necessarily be the geographically closest one).

The beauty of that is if a new better mirror comes online you will automatically use that and/or if your local mirror goes offline, you won't need to update your sources.list!

Please see http://httpredir.debian.org/ for full details.

Please note, that you still need to use security.debian.org for security updates!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.