浏览代码

dpkg-source: drop support of debian/control's Format field

There are no interesting use case where it makes sense to hardcode
the source format directly in debian/control. So drop that feature
before people start abusing this field instead of using
debian/source/format (which dpkg-source can have to create in some cases).
Raphael Hertzog 17 年之前
父节点
当前提交
1463ac71ba
共有 3 个文件被更改,包括 6 次插入7 次删除
  1. 3 0
      debian/changelog
  2. 1 3
      man/dpkg-source.1
  3. 2 4
      scripts/dpkg-source.pl

+ 3 - 0
debian/changelog

@@ -9,6 +9,9 @@ dpkg (1.15.1) UNRELEASED; urgency=low
   * Fix dpkg-shlibdeps so that it works again when analyzing binaries
     outside of package's directory. Closes: #518687
   * Modify dpkg-shlibdeps to let shlibs.local override symbols files too.
+  * Drop support of debian/control's “Format” field used by dpkg-source while
+    it's not too late. Instead debian/source/format should be used to indicate
+    the desired source package format.
 
   [ Updated dselect translations ]
   * German (Sven Joachim).

+ 1 - 3
man/dpkg-source.1

@@ -57,7 +57,6 @@ additional parameters might be accepted.
 
 \fBdpkg\-source\fP will build the source package with the first format
 that works from this ordered list:
-the format indicated in the \fIFormat\fP field of \fBdebian/control\fP,
 the format(s) indicated with the \fI\-\-format\fP command-line option(s),
 the format indicated in \fBdebian/source/format\fP,
 "1.0", "3.0 (native)". See below for an extensive description of
@@ -93,8 +92,7 @@ defaults to the debian standard format.
 .TP
 .BI \-\-format= value
 Try first the given format for building the source package. If used
-multiple times, they are tried in order. It doesn't override
-any explicit \fIFormat\fP field in \fBdebian/control\fP but it does
+multiple times, they are tried in order. It does
 override any format given in \fBdebian/source/format\fP.
 .TP
 .BI \-V name = value

+ 2 - 4
scripts/dpkg-source.pl

@@ -164,7 +164,7 @@ if ($options{'opmode'} eq 'build') {
 	if (m/^Source$/i) {
 	    set_source_package($v);
 	    $fields->{$_} = $v;
-	} elsif (m/^(Format|Standards-Version|Origin|Maintainer|Homepage)$/i ||
+	} elsif (m/^(Standards-Version|Origin|Maintainer|Homepage)$/i ||
 		 m/^Dm-Upload-Allowed$/i ||
 		 m/^Vcs-(Browser|Arch|Bzr|Cvs|Darcs|Git|Hg|Mtn|Svn)$/i) {
 	    $fields->{$_} = $v;
@@ -252,9 +252,7 @@ if ($options{'opmode'} eq 'build') {
     $fields->{'Binary'} = join(', ', @binarypackages);
 
     # Generate list of formats to try
-    my @try_formats;
-    push @try_formats, $fields->{'Format'} if exists $fields->{'Format'};
-    push @try_formats, @cmdline_formats;
+    my @try_formats = (@cmdline_formats);
     if (-e "$dir/debian/source/format") {
         open(FORMAT, "<", "$dir/debian/source/format") ||
             syserr(_g("cannot read %s"), "$dir/debian/source/format");