I'm developing debian packages and I have troubles with correctly defining 'Installed-Size' under DEBIAN/control.
I have created a script that continuously checks svn repository for new revisions, and if found some changes then calculates code's size (excluding DEBIAN folder) with du -s command and then this value is placed to 'Installed-size'.
DEBIAN/control file looks like follows:
Package: myfirstdebpackage
Version: 1.0
Architecture: all
Maintainer: me
Installed-Size: 16664
Depends: python (>=2.7), python-appindicator, python-numpy, python-suds
Section: extras
Priority: optional
Homepage: www.example.com
Description: My first deb package
Application's folder structure:
myfirstdebpackage/DEBIAN
myfirstdebpackage/usr/bin/myfirstdebpackage/<files>
First installation goes well (via apt repository) but after creating a newer version and trying to update package I got 'size-mismatch' or 'Hash Sum mismatch' error.
What's wrong?
I'm assuming that you are generating the binary package with the same version but with different content each time. Do not do that. This will confuse apt and many other tools, which expect and assume that each pkgname-version-arch tuple denotes a unique and different package.
Regarding the Installed-Size, dpkg-gencontrol would generate it automatically for you, but I'm assuming you are creating the DEBIAN/control file by hand. I'd recommend against that, because it means more manual work which is more prone to error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With