Improve the handling for apt when it comes to network sources.


As of Ubuntu 5.10, the default sources.list is dynamically generated based on (among other information) whether a network connection was available during the installation of the system. In order to be more consistent in the face of changing hardware (and changing support for hardware), it would be preferable if the network sources were always available, regardless of network availability during installation.

Use cases



Hide the warning/error when no network source information is available by default.


The current implementation in the branch works as followed.

  1. The methods backend will report a optional "FailReason" to the acquire code.

  2. On a "Timeout", "TmpResolveFailure" and "ConnectionRefused" it is assumed that the network is not available for this source and the attempt to fetch it will be canceld. The status will be set to StatTransientNetworkError.

  3. The old signature and indexfiles for this source will be used and a warning (instead of a error) is issued.
  4. The list cleaner for /var/lib/apt/lists will not run on StatTransientNetworkError status

  5. No warnings about missing index files will be issued from
  6. apt-get update will still return a non-zero exit code on "real" network failures.


The code is available in the branch and uploaded to dapper. The coresponding changes are done in synaptic and aptitude as well.


DefaultAptSources (last edited 2008-08-06 16:32:36 by localhost)