Browse Source

scripts: Uppercase field names in error messages

Guillem Jover 11 years ago
parent
commit
c6d00a0974
3 changed files with 4 additions and 2 deletions
  1. 1 0
      debian/changelog
  2. 1 1
      scripts/Dpkg/Control/Info.pm
  3. 2 1
      scripts/Dpkg/Source/Package.pm

+ 1 - 0
debian/changelog

@@ -84,6 +84,7 @@ dpkg (1.18.0) UNRELEASED; urgency=low
   * Output strings fixes and improvements:
     - Say “execute” instead of “exec” in Dpkg::Changelog::Parse error message.
     - Say “package” instead of “it” in dpkg-name warning message.
+    - Uppercase field names in error messages.
 
   [ Raphaël Hertzog ]
   * Drop myself from Uploaders.

+ 1 - 1
scripts/Dpkg/Control/Info.pm

@@ -100,7 +100,7 @@ sub parse {
     return if not $cdata->parse($fh, $desc);
     $self->{source} = $cdata;
     unless (exists $cdata->{Source}) {
-	$cdata->parse_error($desc, g_('first block lacks a source field'));
+	$cdata->parse_error($desc, g_('first block lacks a Source field'));
     }
     while (1) {
 	$cdata = Dpkg::Control->new(type => CTRL_INFO_PKG);

+ 2 - 1
scripts/Dpkg/Source/Package.pm

@@ -337,7 +337,8 @@ sub get_basename {
     my ($self, $with_revision) = @_;
     my $f = $self->{fields};
     unless (exists $f->{'Source'} and exists $f->{'Version'}) {
-        error(g_('source and version are required to compute the source basename'));
+        error(g_('%s and %s fields are required to compute the source basename'),
+              'Source', 'Version');
     }
     my $v = Dpkg::Version->new($f->{'Version'});
     my $vs = $v->as_string(omit_epoch => 1, omit_revision => !$with_revision);