瀏覽代碼

dpkg-gencontrol: Run du with --apparent-size for the Installed-Size field

This will give consistent results independent of build system.

Even though this will keep not providing accurate enough information
for the field's purpose and as such some times the size reported will
be less than the space eventually used, having the value changing
depending on the build system is just bogus.

Closes: #630533

Signed-off-by: Guillem Jover <guillem@debian.org>
Ludovic Brenta 15 年之前
父節點
當前提交
1165f68216
共有 2 個文件被更改,包括 5 次插入1 次删除
  1. 3 0
      debian/changelog
  2. 2 1
      scripts/dpkg-gencontrol.pl

+ 3 - 0
debian/changelog

@@ -92,6 +92,9 @@ dpkg (1.16.1) UNRELEASED; urgency=low
   * Do not allow blank lines in field values. Closes: #308082
   * Do not warn on missing architecture on packages in config-files state,
     but then make sure the architecture field is usable. Closes: #604241
+  * Run du with --apparent-size when generating the Installed-Size field in
+    dpkg-gencontrol to get consistent results independent of build system.
+    Thanks to Ludovic Brenta <ludovic@ludovic-brenta.org>. Closes: #630533
 
   [ Bill Allombert]
   * Add support for Build-Features: build-arch. Closes: #229357

+ 2 - 1
scripts/dpkg-gencontrol.pl

@@ -301,7 +301,8 @@ if (!defined($substvars->get('Installed-Size'))) {
     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>) {