Przeglądaj źródła

scripts: Mark Format and Installed-Size as automatic substvars

Guillem Jover 12 lat temu
rodzic
commit
cdaa15c594
3 zmienionych plików z 5 dodań i 3 usunięć
  1. 2 0
      debian/changelog
  2. 1 1
      scripts/dpkg-genchanges.pl
  3. 2 2
      scripts/dpkg-gencontrol.pl

+ 2 - 0
debian/changelog

@@ -74,6 +74,8 @@ dpkg (1.17.11) UNRELEASED; urgency=low
   * Remove unused pkglibdir variable from libdpkg.pc.in.
   * Perl modules:
     - Add new set_as_auto() method to Dpkg::Substvars.
+  * Mark Format and Installed-Size as automatic substvars in dpkg-genchanges
+    and dpkg-gencontrol respectively.
 
   [ Updated programs translations ]
   * Danish (Joe Dalton). Closes: #754127

+ 1 - 1
scripts/dpkg-genchanges.pl

@@ -77,7 +77,7 @@ my $since;
 
 my $substvars_loaded = 0;
 my $substvars = Dpkg::Substvars->new();
-$substvars->set('Format', $changes_format);
+$substvars->set_as_auto('Format', $changes_format);
 
 use constant BUILD_SOURCE     => 1;
 use constant BUILD_ARCH_DEP   => 2;

+ 2 - 2
scripts/dpkg-gencontrol.pl

@@ -353,11 +353,11 @@ if (!defined($substvars->get('Installed-Size'))) {
     if ($duo !~ m/^(\d+)\s+\.$/) {
         error(_g("du gave unexpected output \`%s'"), $duo);
     }
-    $substvars->set_as_used('Installed-Size', $1);
+    $substvars->set_as_auto('Installed-Size', $1);
 }
 if (defined($substvars->get('Extra-Size'))) {
     my $size = $substvars->get('Extra-Size') + $substvars->get('Installed-Size');
-    $substvars->set_as_used('Installed-Size', $size);
+    $substvars->set_as_auto('Installed-Size', $size);
 }
 if (defined($substvars->get('Installed-Size'))) {
     $fields->{'Installed-Size'} = $substvars->get('Installed-Size');