[Bug 1254225] [NEW] apt-get update reports spurious failures
Edward Z. Yang
ezyang at cs.stanford.edu
Sat Nov 23 02:47:58 UTC 2013
Public bug reported:
When one entry in sources.list is incorrect, apt-get update may
incorrectly report that other sources (which are fine) are also broken.
This is because apt-get first looks for InRelease before actually
downloading Release.gpg; so a single failing source will skip the rest
of the downloads, and then later when apt-get sweeps the cache looking
for missing Release.gpg, it concludes the other sources are not working
either. Here is an example transcript:
# with the broken http://localhost:80 repo in sources.list
(saucy-amd64)root at sabre:/etc# cat apt/sources.list
deb http://localhost:9999/ubuntu/ saucy main restricted universe multiverse
deb-src http://localhost:9999/ubuntu/ saucy main restricted universe multiverse
deb http://localhost:9999/ubuntu/ saucy-updates main restricted universe multiverse
deb-src http://localhost:9999/ubuntu/ saucy-updates main restricted universe multiverse
deb http://localhost:9999/ubuntu/ saucy-proposed main restricted universe multiverse
deb-src http://localhost:9999/ubuntu/ saucy-proposed main restricted universe multiverse
deb http://localhost:9999/secure/ saucy-security main restricted universe multiverse
deb-src http://localhost:9999/secure saucy-security main restricted universe multiverse
deb http://localhost/repo ./
(saucy-amd64)root at sabre:/etc# apt-get update
Ign http://localhost:9999 saucy InRelease
Ign http://localhost:9999 saucy-updates InRelease
Ign http://localhost:9999 saucy-proposed InRelease
Ign http://localhost:9999 saucy-security InRelease
Err http://localhost ./ InRelease
Err http://localhost:9999 saucy Release.gpg
Unable to connect to localhost:9999:
Err http://localhost:9999 saucy-updates Release.gpg
Unable to connect to localhost:9999:
Err http://localhost:9999 saucy-proposed Release.gpg
Unable to connect to localhost:9999:
Err http://localhost:9999 saucy-security Release.gpg
Unable to connect to localhost:9999:
Err http://localhost ./ Release.gpg
Unable to connect to localhost:80:
Reading package lists... Done
W: Failed to fetch http://localhost/repo/./InRelease
W: Failed to fetch http://localhost:9999/ubuntu/dists/saucy/Release.gpg
Unable to connect to localhost:9999:
W: Failed to fetch http://localhost:9999/ubuntu/dists/saucy-
updates/Release.gpg Unable to connect to localhost:9999:
W: Failed to fetch http://localhost:9999/ubuntu/dists/saucy-
proposed/Release.gpg Unable to connect to localhost:9999:
W: Failed to fetch http://localhost:9999/secure/dists/saucy-
security/Release.gpg Unable to connect to localhost:9999:
W: Failed to fetch http://localhost/repo/./Release.gpg Unable to connect
to localhost:80:
W: Some index files failed to download. They have been ignored, or old
ones used instead.
# Now with the broken entry removed
(saucy-amd64)root at sabre:/etc# cat apt/sources.list
deb http://localhost:9999/ubuntu/ saucy main restricted universe multiverse
deb-src http://localhost:9999/ubuntu/ saucy main restricted universe multiverse
deb http://localhost:9999/ubuntu/ saucy-updates main restricted universe multiverse
deb-src http://localhost:9999/ubuntu/ saucy-updates main restricted universe multiverse
deb http://localhost:9999/ubuntu/ saucy-proposed main restricted universe multiverse
deb-src http://localhost:9999/ubuntu/ saucy-proposed main restricted universe multiverse
deb http://localhost:9999/secure/ saucy-security main restricted universe multiverse
deb-src http://localhost:9999/secure saucy-security main restricted universe multiverse
(saucy-amd64)root at sabre:/etc# apt-get update
Ign http://localhost:9999 saucy InRelease
Ign http://localhost:9999 saucy-updates InRelease
Ign http://localhost:9999 saucy-proposed InRelease
Ign http://localhost:9999 saucy-security InRelease
Get:1 http://localhost:9999 saucy Release.gpg [933 B]
Get:2 http://localhost:9999 saucy-updates Release.gpg [933 B]
Get:3 http://localhost:9999 saucy-proposed Release.gpg [933 B]
Get:4 http://localhost:9999 saucy-security Release.gpg [933 B]
Get:5 http://localhost:9999 saucy Release [49.6 kB]
Get:6 http://localhost:9999 saucy-updates Release [49.6 kB]
Get:7 http://localhost:9999 saucy-proposed Release [49.6 kB]
Get:8 http://localhost:9999 saucy-security Release [49.6 kB]
Get:9 http://localhost:9999 saucy/main Translation-en [711 kB]
Get:10 http://localhost:9999 saucy/multiverse Translation-en [101 kB]
Get:11 http://localhost:9999 saucy/restricted Translation-en [2686 B]
Get:12 http://localhost:9999 saucy/universe Translation-en [3886 kB]
[etc]
Also reported upstream (Debian BTS) as #730237
** Affects: apt (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1254225
Title:
apt-get update reports spurious failures
Status in “apt” package in Ubuntu:
New
Bug description:
When one entry in sources.list is incorrect, apt-get update may
incorrectly report that other sources (which are fine) are also
broken. This is because apt-get first looks for InRelease before
actually downloading Release.gpg; so a single failing source will skip
the rest of the downloads, and then later when apt-get sweeps the
cache looking for missing Release.gpg, it concludes the other sources
are not working either. Here is an example transcript:
# with the broken http://localhost:80 repo in sources.list
(saucy-amd64)root at sabre:/etc# cat apt/sources.list
deb http://localhost:9999/ubuntu/ saucy main restricted universe multiverse
deb-src http://localhost:9999/ubuntu/ saucy main restricted universe multiverse
deb http://localhost:9999/ubuntu/ saucy-updates main restricted universe multiverse
deb-src http://localhost:9999/ubuntu/ saucy-updates main restricted universe multiverse
deb http://localhost:9999/ubuntu/ saucy-proposed main restricted universe multiverse
deb-src http://localhost:9999/ubuntu/ saucy-proposed main restricted universe multiverse
deb http://localhost:9999/secure/ saucy-security main restricted universe multiverse
deb-src http://localhost:9999/secure saucy-security main restricted universe multiverse
deb http://localhost/repo ./
(saucy-amd64)root at sabre:/etc# apt-get update
Ign http://localhost:9999 saucy InRelease
Ign http://localhost:9999 saucy-updates InRelease
Ign http://localhost:9999 saucy-proposed InRelease
Ign http://localhost:9999 saucy-security InRelease
Err http://localhost ./ InRelease
Err http://localhost:9999 saucy Release.gpg
Unable to connect to localhost:9999:
Err http://localhost:9999 saucy-updates Release.gpg
Unable to connect to localhost:9999:
Err http://localhost:9999 saucy-proposed Release.gpg
Unable to connect to localhost:9999:
Err http://localhost:9999 saucy-security Release.gpg
Unable to connect to localhost:9999:
Err http://localhost ./ Release.gpg
Unable to connect to localhost:80:
Reading package lists... Done
W: Failed to fetch http://localhost/repo/./InRelease
W: Failed to fetch
http://localhost:9999/ubuntu/dists/saucy/Release.gpg Unable to connect
to localhost:9999:
W: Failed to fetch http://localhost:9999/ubuntu/dists/saucy-
updates/Release.gpg Unable to connect to localhost:9999:
W: Failed to fetch http://localhost:9999/ubuntu/dists/saucy-
proposed/Release.gpg Unable to connect to localhost:9999:
W: Failed to fetch http://localhost:9999/secure/dists/saucy-
security/Release.gpg Unable to connect to localhost:9999:
W: Failed to fetch http://localhost/repo/./Release.gpg Unable to
connect to localhost:80:
W: Some index files failed to download. They have been ignored, or old
ones used instead.
# Now with the broken entry removed
(saucy-amd64)root at sabre:/etc# cat apt/sources.list
deb http://localhost:9999/ubuntu/ saucy main restricted universe multiverse
deb-src http://localhost:9999/ubuntu/ saucy main restricted universe multiverse
deb http://localhost:9999/ubuntu/ saucy-updates main restricted universe multiverse
deb-src http://localhost:9999/ubuntu/ saucy-updates main restricted universe multiverse
deb http://localhost:9999/ubuntu/ saucy-proposed main restricted universe multiverse
deb-src http://localhost:9999/ubuntu/ saucy-proposed main restricted universe multiverse
deb http://localhost:9999/secure/ saucy-security main restricted universe multiverse
deb-src http://localhost:9999/secure saucy-security main restricted universe multiverse
(saucy-amd64)root at sabre:/etc# apt-get update
Ign http://localhost:9999 saucy InRelease
Ign http://localhost:9999 saucy-updates InRelease
Ign http://localhost:9999 saucy-proposed InRelease
Ign http://localhost:9999 saucy-security InRelease
Get:1 http://localhost:9999 saucy Release.gpg [933 B]
Get:2 http://localhost:9999 saucy-updates Release.gpg [933 B]
Get:3 http://localhost:9999 saucy-proposed Release.gpg [933 B]
Get:4 http://localhost:9999 saucy-security Release.gpg [933 B]
Get:5 http://localhost:9999 saucy Release [49.6 kB]
Get:6 http://localhost:9999 saucy-updates Release [49.6 kB]
Get:7 http://localhost:9999 saucy-proposed Release [49.6 kB]
Get:8 http://localhost:9999 saucy-security Release [49.6 kB]
Get:9 http://localhost:9999 saucy/main Translation-en [711 kB]
Get:10 http://localhost:9999 saucy/multiverse Translation-en [101 kB]
Get:11 http://localhost:9999 saucy/restricted Translation-en [2686 B]
Get:12 http://localhost:9999 saucy/universe Translation-en [3886 kB]
[etc]
Also reported upstream (Debian BTS) as #730237
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1254225/+subscriptions
More information about the foundations-bugs
mailing list