Package: dpkg-dev
Version: 1.16.0.3
Severity: normal
Tags: patch
While building one of my packages I was surprised by the results of
dpkg-gencontrol:
Installed-Size: 128956
when the size of the binary .deb file is only 4608146. As it turns out,
this is because "du -sk" and "du -sk --apparent-size" give wildly
different results. Without --apparent-size, du takes the filesystem
block size into account; a large number of small files (as in my
package) therefore inflates the Installed-Size out of proportion.
It could be argued that installing the .deb package containing many
small files on a target system will also consume lots of blocks, each
with some minimum size, but this size depends on the filesystem chosen
on the target machine, not on the Debian package. In particular,
reiserfs stores lots of small files efficiently.
As a consequence I suggest passing --apparent-size to du when calling du
from dpkg-gencontrol, i.e.
--- /usr/bin/dpkg-gencontrol 2011-05-04 10:36:16.000000000 +0200
+++ ~/bin/dpkg-gencontrol 2011-06-14 23:18:23.912877672 +0200
@@ -301,7 +301,8 @@
if (!$c) {
chdir("$packagebuilddir") ||
syserr(_g("chdir for du to \`%s'"), $packagebuilddir);
- exec("du", "-k", "-s", ".") or syserr(_g("unable to execute %s"),
"du");
+ exec("du", "-k", "-s", "--apparent-size", ".")
+ or syserr(_g("unable to execute %s"), "du");
}
my $duo = '';
while (<DU>) {
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.38-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages dpkg-dev depends on:
ii base-files 6.3 Debian base system miscellaneous f
ii binutils 2.21.51.20110523-1 The GNU assembler, linker and bina
ii bzip2 1.0.5-6 high-quality block-sorting file co
ii libdpkg-perl 1.16.0.3 Dpkg perl modules
ii make 3.81-8.1 An utility for Directing compilati
ii patch 2.6.1-2 Apply a diff file to an original
ii xz-utils 5.0.0-2 XZ-format compression utilities
Versions of packages dpkg-dev recommends:
pn build-essential <none> (no description available)
ii fakeroot 1.15.1-1 tool for simulating superuser priv
ii gcc [c-compiler] 4:4.5.2-2 The GNU C compiler
ii gcc-4.4 [c-compiler] 4.4.6-3 The GNU C compiler
ii gcc-4.5 [c-compiler] 4.5.3-1 The GNU C compiler
ii gnupg 1.4.11-3 GNU privacy guard - a free PGP rep
ii gpgv 1.4.11-3 GNU privacy guard - signature veri
pn libalgorithm-merge-perl <none> (no description available)
Versions of packages dpkg-dev suggests:
ii debian-keyring 2011.03.03 GnuPG keys of Debian Developers
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]