[apt-ftparchive] Getting "Size mismatch" when rebuilding a package with same version

Bug #311186 reported by Christoph Korn
4
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: apt

There is a bug in apt-ftparchive that makes it not update the filesize and hash sums.

To reproduce it:
Build a package and let apt-ftparchive archive that package in a Packages file.
Then make some changes to the package and let it build again. Then apt-ftparchive does
not update the filesize and hash sums in the Packages file.
If you then have a package that has a build dependency on that package you get something like that
from apt when it tries to install the package:
Failed to fetch http://localhost/post_build/intrepid/libtuxcap1_1.3.3-1~getdeb1_i386.deb Size mismatch

Revision history for this message
Christoph Korn (c-korn) wrote :

apt-utils:
Installed: 0.7.9ubuntu17.1

Revision history for this message
H.-Dirk Schmitt (dirk-computer42) wrote :

see man apt-ftparchive

APT::FTPArchive::AlwaysStat

           apt-ftparchive(1) caches as much as possible of metadata in a cachedb. If packages are recompiled and/or republished
           with the same version again, this will lead to problems as the now outdated cached metadata like size and checksums
           will be used. With this option enabled this will no longer happen as it will be checked if the file was changed. Note
           that this option is set to "false" by default as it is not recommend to upload multiply versions/builds of a package
           with the same versionnumber, so in theory nobody will have these problems and therefore all these extra checks are
           useless.

Revision history for this message
H.-Dirk Schmitt (dirk-computer42) wrote :

As a manual workaround for a single rebuild just remove the packages-i386.db/packages-amd64.db/.. cache files.

Changed in apt (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.