APT fails on packages >= 2 GB
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Ubuntu 10.04 apt-0.7.
"apt-get install <package>" fails when trying to install packages larger than approximately 2 GB.
The reason is that APT uses incorrect data types - it counts bytes in floating point(!) as well as signed 32-bit variables, and uses atoi() to convert string representations of sizes to numbers.
The attached patch makes APT use ssize_t and atol().
Symptoms when installing from a private repository containing large packages:
# apt-get install matlab2011b
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
matlab2011b-bin
The following NEW packages will be installed:
matlab2011b matlab2011b-bin
0 upgraded, 2 newly installed, 0 to remove and 126 not upgraded.
2.2856e+
How odd.. The sizes didn't match, email <email address hidden>
Need to get 2,286MB/2,286MB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://
Fetched 1B in 24s (0B/s)
Failed to fetch http://
W: Bizarre Error - File size is not what the server reported 2285595598 184467440717001
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
description: | updated |
tags: | added: lucid patch |
Using ssize_t doesn't help 32bit systems as ssize_t is only on 64bit systems larger than an int.
Either way, the issue should be fixed in a newer release of APT, see LP: #250909 and debians APT version 0.7.26~exp6 for details. It might be possible that this is not completely fixed for everyone through as debugs #632271 suggests which is only fixed in debian experimental for now (as these kind of changes make an abi break nessary and are therefore out of question for a sane backport).
It would be cool if you could test these versions and report back. I am closing this bug in the meantime. If it is really not fixed in newer versions please reopen!