update misinterprets 304 response on Packages.gz
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Description: Ubuntu 16.04.3 LTS
Release: 16.04
ii apt 1.2.24 amd64 commandline package manager
ii apt-transport-https 1.2.24 amd64 https download transport for APT
ii apt-utils 1.2.24 amd64 package management related utility programs
ii libapt-
ii libapt-pkg5.0:amd64 1.2.24 amd64 package management runtime library
Expected behaviour:
If apt-get gets a 304 Not Modified when requesting Packages.gz, it should ignore the package list (i.e., there's no update).
Observed behaviour:
Added a local repository to /etc/apt/
> deb [arch=amd64 trusted=yes] http://
The first time running apt-get update succeeds; in addition, apache.log shows:
> 10.0.4.72 - - [20/Feb/
I am able to install packages from that repo without error.
Running apt-get a 2nd time succeeds. apache.log doesn't show a request for Packages.gz
Running apt-get a 3rd time, apache.log shows:
> 10.0.4.72 - - [20/Feb/
However, on the console where I ran apt-get, the corresponding output is:
> Err:15 http://
> 404 Not Found
> ...
> E: Failed to fetch http://
> E: Some index files failed to download. They have been ignored, or old ones used instead.
tags: | added: xenial |
In trusty, this works as expected.
ii apt 1.0.1ubuntu2.1 amd64 commandline package manager inst1.5: amd64 1.0.1ubuntu2.1 amd64 deb package format runtime library pkg4.12: amd64 1.0.1ubuntu2.1 amd64 package management runtime library
ii apt-transport-https 1.0.1ubuntu2.1 amd64 https download transport for APT
ii apt-utils 1.0.1ubuntu2.1 amd64 package management related utility programs
ii libapt-
ii libapt-
Running "apt-get update" the first time, apache returns 200:
> 10.0.4.72 - - [20/Feb/ 2018:13: 49:27 -0500] "GET /instafreight/ dists/trusty/ php/binary- amd64/Packages. gz HTTP/1.1" 200 951 "-" "Debian APT-HTTP/1.3 (1.0.1ubuntu2)"
Running "apt-get update" the second time:
> 10.0.4.72 - - [20/Feb/ 2018:13: 49:53 -0500] "GET /instafreight/ dists/trusty/ php/binary- amd64/Packages. gz HTTP/1.1" 304 124 "-" "Debian APT-HTTP/1.3 (1.0.1ubuntu2)"
> Hit http:// ubuntu. pp trusty/php amd64 Packages
... and third time:
> 10.0.4.72 - - [20/Feb/ 2018:13: 49:59 -0500] "GET /instafreight/ dists/trusty/ php/binary- amd64/Packages. gz HTTP/1.1" 304 124 "-" "Debian APT-HTTP/1.3 (1.0.1ubuntu2)"
> Hit http:// ubuntu. pp trusty/main amd64 Packages