Explorar o código

dpkg-gencontrol: add support for Built-Using field

And teach dpkg-deb to not complain about it.

Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
Mark Hymers %!s(int64=15) %!d(string=hai) anos
pai
achega
a8cb927edb
Modificáronse 5 ficheiros con 23 adicións e 0 borrados
  1. 3 0
      debian/changelog
  2. 1 0
      dpkg-deb/build.c
  3. 11 0
      man/deb-control.5
  4. 3 0
      man/deb-src-control.5
  5. 5 0
      scripts/Dpkg/Control/Fields.pm

+ 3 - 0
debian/changelog

@@ -105,6 +105,9 @@ dpkg (1.16.0) UNRELEASED; urgency=low
     architecture which should be used as the path component for library
     installation.
 
+  [ Mark Hymers ]
+  * Add support for Built-Using field. Closes: #619311
+
   [ Updated programs translations ]
   * German (Sven Joachim).
   * Portuguese (Miguel Figueiredo).

+ 1 - 0
dpkg-deb/build.c

@@ -289,6 +289,7 @@ check_conffiles(const char *dir)
 }
 
 static const char *arbitrary_fields[] = {
+  "Built-Using",
   "Package-Type",
   "Subarchitecture",
   "Kernel-Version",

+ 11 - 0
man/deb-control.5

@@ -229,6 +229,17 @@ and
 .B Replaces
 fields.
 .
+.TP
+.BR Built-Using: " <package list>"
+This field lists extra source packages that were used during the build of this
+binary package.  This is an indication to the archive maintenance software that
+these extra source packages must be kept whilst this binary package is
+maintained.  This field must be a list of source package names with strict (=)
+version relationships.  Note that the archive maintenance software is likely to
+refuse to accept an upload which declares a
+.B Built-Using
+relationship which cannot be satisfied within the archive.
+.
 .SH EXAMPLE
 .\" .RS
 .nf

+ 3 - 0
man/deb-src-control.5

@@ -252,6 +252,9 @@ package.
 .TP
 .PD 0
 .BR Provides: " <package list>"
+.TP
+.PD 0
+.BR Built-Using: " <package list>"
 .br
 These fields declare relationships between packages. They are discussed in
 the

+ 5 - 0
scripts/Dpkg/Control/Fields.pm

@@ -78,6 +78,11 @@ our %FIELDS = (
         dependency => 'normal',
         dep_order => 2,
     },
+    'Built-Using' => {
+        allowed => ALL_PKG,
+        dependency => 'union',
+        dep_order => 10,
+    },
     'Changed-By' => {
         allowed => CTRL_FILE_CHANGES,
     },