Generates incorrect Packages file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mini-dinstall (Debian) |
Fix Released
|
Unknown
|
|||
mini-dinstall (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: mini-dinstall
nick@nitrogen$ lsb_release -rd
Description: Ubuntu 8.10
Release: 8.10
nick@nitrogen$ apt-cache policy mini-dinstall
mini-dinstall:
Installed: 0.6.25ubuntu1
Candidate: 0.6.25ubuntu1
Version table:
*** 0.6.25ubuntu1 0
500 http://
100 /var/lib/
See http://
The bug might be in apt-ftparchive. The problem is in the use of a database file in the call made by mini-dinstall to apt-ftparchive to generate the Packages file, e.g.:
Dec 12 08:50:06 mini-dinstall [1103288656] DEBUG: Running: apt-ftparchive packages stable --db stable.db
The database appears to retain information from a previous version of the package. The generated Packages file therefore does not match the uploaded package, because it describes the earlier version and apt-get refuses to install it. 'apt-get install <package>' fails on a size mismatch or on an incorrect dependency (incorrect in the older version, fixed in the newer version).
A contributing factor might be that I routinely upload changed or fixed packages without incrementing the version number on my package, to test packages while in development. I do not want to have to increment the version every time I change and redeploy a package in development.
As a workaround, I set my dput post_upload_command to remove the database file after running mini-dinstall. My local package archive is now functional again.
Neither mini-dinstall nor apt-ftparchive appear to offer guidance on the use of the database file, so I cannot tell what might be a more correct solution.
Changed in mini-dinstall (Debian): | |
status: | Unknown → Fix Committed |
Changed in mini-dinstall (Debian): | |
status: | Fix Committed → Fix Released |
I had the same problem, with apt-get persistently reporting 'Size mismatch' errors when fetching files from a local repository containing .debs naughtily rebuilt without revving the version number.
In my case, my ~/.dput.cf post_upload_command calls 'debarchiver -x', which in turn calls apt-ftparchive, which is generating incorrect size information in the Packages file. The solution was to delete /var/cache/ debarchiver/ cache.db, which I assume debarchiver tells apt-ftparchive to use.