Переглянути джерело

Dpkg::Control::HashCore: Say OpenPGP instead of PGP in comments and errors

When we meant the standard (and not the tool) we should have been saying
OpenPGP.
Guillem Jover 12 роки тому
батько
коміт
43c945efdf
2 змінених файлів з 10 додано та 8 видалено
  1. 2 0
      debian/changelog
  2. 8 8
      scripts/Dpkg/Control/HashCore.pm

+ 2 - 0
debian/changelog

@@ -77,6 +77,8 @@ dpkg (1.17.11) UNRELEASED; urgency=low
   * Mark Format and Installed-Size as automatic substvars in dpkg-genchanges
   * Mark Format and Installed-Size as automatic substvars in dpkg-genchanges
     and dpkg-gencontrol respectively.
     and dpkg-gencontrol respectively.
   * Warn on usage of deprecated Source-Version substvar.
   * Warn on usage of deprecated Source-Version substvar.
+  * Say OpenPGP instead of PGP when referring to the standard on code comments
+    and output messages.
 
 
   [ Updated programs translations ]
   [ Updated programs translations ]
   * Danish (Joe Dalton). Closes: #754127
   * Danish (Joe Dalton). Closes: #754127

+ 8 - 8
scripts/Dpkg/Control/HashCore.pm

@@ -73,7 +73,7 @@ are:
 
 
 =item allow_pgp
 =item allow_pgp
 
 
-Configures the parser to accept PGP signatures around the control
+Configures the parser to accept OpenPGP signatures around the control
 information. Value can be 0 (default) or 1.
 information. Value can be 0 (default) or 1.
 
 
 =item allow_duplicate
 =item allow_duplicate
@@ -225,33 +225,33 @@ sub parse {
 	} elsif (m/^-----BEGIN PGP SIGNED MESSAGE-----$/) {
 	} elsif (m/^-----BEGIN PGP SIGNED MESSAGE-----$/) {
 	    $expect_pgp_sig = 1;
 	    $expect_pgp_sig = 1;
 	    if ($$self->{allow_pgp} and not $parabody) {
 	    if ($$self->{allow_pgp} and not $parabody) {
-		# Skip PGP headers
+		# Skip OpenPGP headers
 		while (<$fh>) {
 		while (<$fh>) {
 		    last if m/^\s*$/;
 		    last if m/^\s*$/;
 		}
 		}
 	    } else {
 	    } else {
-		$self->parse_error($desc, _g('PGP signature not allowed here'));
+		$self->parse_error($desc, _g('OpenPGP signature not allowed here'));
 	    }
 	    }
 	} elsif (m/^$/ || ($expect_pgp_sig && m/^-----BEGIN PGP SIGNATURE-----$/)) {
 	} elsif (m/^$/ || ($expect_pgp_sig && m/^-----BEGIN PGP SIGNATURE-----$/)) {
 	    if ($expect_pgp_sig) {
 	    if ($expect_pgp_sig) {
 		# Skip empty lines
 		# Skip empty lines
 		$_ = <$fh> while defined($_) && $_ =~ /^\s*$/;
 		$_ = <$fh> while defined($_) && $_ =~ /^\s*$/;
 		unless (length $_) {
 		unless (length $_) {
-		    $self->parse_error($desc, _g('expected PGP signature, ' .
+		    $self->parse_error($desc, _g('expected OpenPGP signature, ' .
 		                                 'found EOF after blank line'));
 		                                 'found EOF after blank line'));
 		}
 		}
 		s/\s*\n$//;
 		s/\s*\n$//;
 		unless (m/^-----BEGIN PGP SIGNATURE-----$/) {
 		unless (m/^-----BEGIN PGP SIGNATURE-----$/) {
-		    $self->parse_error($desc, _g('expected PGP signature, ' .
+		    $self->parse_error($desc, _g('expected OpenPGP signature, ' .
 		                                 "found something else \`%s'"), $_);
 		                                 "found something else \`%s'"), $_);
                 }
                 }
-		# Skip PGP signature
+		# Skip OpenPGP signature
 		while (<$fh>) {
 		while (<$fh>) {
 		    s/\s*\n$//;
 		    s/\s*\n$//;
 		    last if m/^-----END PGP SIGNATURE-----$/;
 		    last if m/^-----END PGP SIGNATURE-----$/;
 		}
 		}
 		unless (defined($_)) {
 		unless (defined($_)) {
-		    $self->parse_error($desc, _g('unfinished PGP signature'));
+		    $self->parse_error($desc, _g('unfinished OpenPGP signature'));
                 }
                 }
 		# This does not mean the signature is correct, that needs to
 		# This does not mean the signature is correct, that needs to
 		# be verified by gnupg.
 		# be verified by gnupg.
@@ -265,7 +265,7 @@ sub parse {
     }
     }
 
 
     if ($expect_pgp_sig and not $$self->{is_pgp_signed}) {
     if ($expect_pgp_sig and not $$self->{is_pgp_signed}) {
-	$self->parse_error($desc, _g('unfinished PGP signature'));
+	$self->parse_error($desc, _g('unfinished OpenPGP signature'));
     }
     }
 
 
     return defined($cf);
     return defined($cf);