Bläddra i källkod

dpkg-gencontrol: Implement source stanza substvars prefixed with S:

These auto-generated variables map each source stanza field into an
output substvar prefixed with “S:”.
Guillem Jover 10 år sedan
förälder
incheckning
1c40b7de35
3 ändrade filer med 12 tillägg och 0 borttagningar
  1. 3 0
      debian/changelog
  2. 8 0
      man/deb-substvars.man
  3. 1 0
      scripts/dpkg-gencontrol.pl

+ 3 - 0
debian/changelog

@@ -25,6 +25,9 @@ dpkg (1.18.11) UNRELEASED; urgency=medium
   * Shutdown the package database journal in dpkg --get-selections.
   * Fix (deactivated) dpkg --command-fd to initialize and reset the files
     database on each action.
+  * Implement source stanza substvars prefixed with S: in dpkg-gencontrol.
+    These auto-generated variables map each source stanza field into an
+    output substvar prefixed with “S:”.
   * Perl modules:
     - Obsolete Source-Version substvar in Dpkg::Substvars by emitting errors.
     - Rework keyring hooks in Dpkg::Vendor. Deprecate the keyrings hook, and

+ 8 - 0
man/deb-substvars.man

@@ -135,6 +135,14 @@ is copied into the
 .B Installed\-Size
 control file field.
 .TP
+.BI S: fieldname
+The value of the source stanza field
+.I fieldname
+(which must be given in the canonical capitalisation; since dpkg 1.18.11).
+Setting these variables has no effect other than on places where they
+are expanded explicitly.
+These variables are only available when generating binary control files.
+.TP
 .BI F: fieldname
 The value of the output field
 .IR fieldname

+ 1 - 0
scripts/dpkg-gencontrol.pl

@@ -200,6 +200,7 @@ foreach (keys %{$src_fields}) {
         field_transfer_single($src_fields, $fields);
     }
 }
+$substvars->set_field_substvars($src_fields, 'S');
 
 # Scan binary package
 foreach (keys %{$pkg}) {