Преглед изворни кода

dpkg-source: reenable the Package-List field

But drop the Architecture column since we have no clear use case yet. It
can always be added later on. Parsers should treat the field as an
extendable one. They shall ignore supplementary columns that they do
not know.

Also drop the source line, it's not needed since the dsc file describes
the source package already (source section and priority are not currently
exported in dedicated fields but they can be added later if we start
having a need for this information).
Raphaël Hertzog пре 15 година
родитељ
комит
8bbd76cc98
2 измењених фајлова са 6 додато и 8 уклоњено
  1. 4 0
      debian/changelog
  2. 2 8
      scripts/dpkg-source.pl

+ 4 - 0
debian/changelog

@@ -21,6 +21,10 @@ dpkg (1.16.1) UNRELEASED; urgency=low
     internal files in /var/lib/dpkg/info/triggers/. Closes: #525160
   * Avoid a perl warning in dpkg-gensymbols when no symbols file has been
     generated (because it would have been empty). Closes: #626684
+  * Reenable the Package-List field but drop the Architecture column since we
+    have no clear use case yet. It can always be added later on.
+    Also drop the source line since it duplicates other fields.
+    Closes: #619131
 
   [ Guillem Jover ]
   * Install deb-src-control(5) man pages in dpkg-dev. Closes: #620520

+ 2 - 8
scripts/dpkg-source.pl

@@ -254,9 +254,7 @@ if ($options{'opmode'} =~ /^(-b|--print-format|--(before|after)-build)$/) {
 	my $prio = $pkg->{'Priority'} || $src_prio;
 	my $type = $pkg->{'Package-Type'} ||
 	        $pkg->get_custom_field('Package-Type') || 'deb';
-	my $arch = $pkg->{'Architecture'};
-	$arch =~ s/\s+/,/g;
-	push @pkglist, sprintf("%s %s %s %s %s", $p, $type, $sect, $prio, $arch);
+	push @pkglist, sprintf("%s %s %s %s", $p, $type, $sect, $prio);
 	push(@binarypackages,$p);
 	foreach $_ (keys %{$pkg}) {
 	    my $v = $pkg->{$_};
@@ -295,11 +293,7 @@ if ($options{'opmode'} =~ /^(-b|--print-format|--(before|after)-build)$/) {
         }
     }
     $fields->{'Architecture'} = join(' ', @sourcearch);
-    $fields->{'Package-List'} = sprintf("\n%s source %s %s %s", $sourcepackage,
-                                        $src_sect, $src_prio,
-                                        join(',', @sourcearch));
-    $fields->{'Package-List'} .= "\n" . join("\n", sort @pkglist);
-    delete $fields->{'Package-List'};
+    $fields->{'Package-List'} = "\n" . join("\n", sort @pkglist);
 
     # Scan fields of dpkg-parsechangelog
     foreach $_ (keys %{$changelog}) {