Browse Source

man, Dpkg::Control::FieldsCore: Add new Auto-Built-Package field

This field is used to distinguish packages that have been automatically
injected by some build tool, and are not present in the debian/control
file.
Guillem Jover 7 years ago
parent
commit
6c8203440b
3 changed files with 15 additions and 1 deletions
  1. 2 0
      debian/changelog
  2. 8 0
      man/deb-control.man
  3. 5 1
      scripts/Dpkg/Control/FieldsCore.pm

+ 2 - 0
debian/changelog

@@ -17,10 +17,12 @@ dpkg (1.18.19) UNRELEASED; urgency=medium
       instead of getting into an infinite loop. Closes: #851441
     - Call anonymous subs via -> operator instead of casting with &, and fix
       bogus POD documentation to match the code.
+    - Add new Auto-Built-Package field to Dpkg::Control::Fields.
   * Documentation:
     - Cleanup software requirements in README.
     - Move control member file references from dpkg(1) to deb(5).
     - Fix typos in docs and code comments.
+    - Document Auto-Built-Package field in deb-control(5).
   * Packaging:
     - Add debsig-verify to dpkg Suggests. The code optionally supports this
       specific signed .deb verification program.

+ 8 - 0
man/deb-control.man

@@ -323,6 +323,14 @@ this binary packages was built with (since dpkg 1.17.2 until 1.18.18).
 The information previously found in this field can now be found in the
 \fB.buildinfo\fP file, which supersedes it.
 .
+.TP
+.BI Auto\-Built\-Package: " reason-list"
+This field specifies a whitespace separated list of reasons why this package
+was auto-generated.
+Binary packages marked with this field will not appear in the
+\fIdebian/control\fP master source control file.
+The only currently used reason is \fBdebug\-symbols\fP.
+.
 .SH EXAMPLE
 .\" .RS
 .nf

+ 5 - 1
scripts/Dpkg/Control/FieldsCore.pm

@@ -73,6 +73,10 @@ our %FIELDS = (
         allowed => CTRL_REPO_RELEASE,
         separator => FIELD_SEP_SPACE,
     },
+    'Auto-Built-Package' => {
+        allowed => ALL_PKG & ~CTRL_INFO_PKG,
+        separator => FIELD_SEP_SPACE,
+    },
     'Binary' => {
         allowed => CTRL_PKG_SRC | CTRL_FILE_BUILDINFO | CTRL_FILE_CHANGES,
         # XXX: This field values are separated either by space or comma
@@ -459,7 +463,7 @@ my @sum_fields = map { $_ eq 'md5' ? 'MD5sum' : &field_capitalize($_) }
 our %FIELD_ORDER = (
     CTRL_PKG_DEB() => [
         qw(Package Package-Type Source Version Built-Using Kernel-Version
-        Built-For-Profiles Architecture Subarchitecture
+        Built-For-Profiles Auto-Built-Package Architecture Subarchitecture
         Installer-Menu-Item Essential Origin Bugs
         Maintainer Installed-Size), &field_list_pkg_dep(),
         qw(Section Priority Multi-Arch Homepage Description Tag Task)