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

Bug#1058934: apt install ./foo.deb re-downloads the package



Package: apt
Version: 2.7.7
Severity: normal
X-Debbugs-Cc: stuart@debian.org,umlaeute@debian.org

Dear Maintainer,

It was observed in #debian pointed out today that "apt install ./foo.deb" was
downloading the .deb again from the mirror:

$ apt download hello
$ sudo apt install ./hello_2.10-3_amd64.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'hello' instead of './hello_2.10-3_amd64.deb'
The following NEW packages will be installed:
hello
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 53.1 kB of archives.
After this operation, 284 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian sid/main amd64 hello amd64 2.10-3 [53.1 kB]
Fetched 53.1 kB in 0s (1,899 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package hello.
(Reading database ... 184783 files and directories currently installed.)
Preparing to unpack .../hello_2.10-3_amd64.deb ...
Unpacking hello (2.10-3) ...
Setting up hello (2.10-3) ...
Processing triggers for man-db (2.12.0-1) ...

On the test machine, apt is using a proxy server whose logs confirmed
that apt redownloaded the file even though it was supposed to use the
local file.

This is a regression since bookworm.

I don't know how apt decides that the remote file is the better one to
use (presumably the usual hash of certain fields?). When manually repacking
the .deb for testing (and getting a different sized .deb as a result), apt
no longer attempted to download and instead used the local version:

Get:1 /tmp/pkgs/hello/hello_2.10-3_amd64.deb hello amd64 2.10-3 [53.0 kB]

(I've repacked hello with a modified file and reused the version string
just for the perversity of the test.)

regards
Stuart


Reply to: