ソースを参照

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 allow blank lines in field values. Closes: #308082
   * Do not warn on missing architecture on packages in config-files state,
   * Do not warn on missing architecture on packages in config-files state,
     but then make sure the architecture field is usable. Closes: #604241
     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]
   [ Bill Allombert]
   * Add support for Build-Features: build-arch. Closes: #229357
   * 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) {
     if (!$c) {
         chdir("$packagebuilddir") ||
         chdir("$packagebuilddir") ||
             syserr(_g("chdir for du to \`%s'"), $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 = '';
     my $duo = '';
     while (<DU>) {
     while (<DU>) {