This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=c50a5e75d936c889e5952f30771fa8e372ddcd1f commit c50a5e75d936c889e5952f30771fa8e372ddcd1f Author: Guillem Jover <[email protected]> AuthorDate: Sat Dec 17 05:55:15 2022 +0100 scripts: Use stanza instead of entry or block Apply the same «stanza» term usage unification matching the documentation fixes, to the perl POD, code comments and error strings. --- scripts/Dpkg.pm | 2 +- scripts/Dpkg/Control.pm | 22 +++++++++++----------- scripts/Dpkg/Control/Hash.pm | 2 +- scripts/Dpkg/Control/HashCore.pm | 5 +++-- scripts/Dpkg/Control/Info.pm | 7 ++++--- scripts/Dpkg/Control/Tests/Entry.pm | 2 +- scripts/Dpkg/Control/Types.pm | 10 +++++----- 7 files changed, 26 insertions(+), 24 deletions(-) diff --git a/scripts/Dpkg.pm b/scripts/Dpkg.pm index 1daa16e88..940399b46 100644 --- a/scripts/Dpkg.pm +++ b/scripts/Dpkg.pm @@ -185,7 +185,7 @@ Manage (list of known) control fields. =item L<Dpkg::Control::Hash> -Parse and manipulate a block of RFC822-like fields. +Parse and manipulate a stanza of deb822 fields. =item L<Dpkg::Control::Info> diff --git a/scripts/Dpkg/Control.pm b/scripts/Dpkg/Control.pm index f41f250d5..7da5993dd 100644 --- a/scripts/Dpkg/Control.pm +++ b/scripts/Dpkg/Control.pm @@ -74,12 +74,12 @@ information is not yet known. =item CTRL_INFO_SRC -Corresponds to the first block of information in a F<debian/control> file in +Corresponds to the first stanza in a F<debian/control> file in a Debian source package. =item CTRL_INFO_PKG -Corresponds to subsequent blocks of information in a F<debian/control> file +Corresponds to subsequent stanza in a F<debian/control> file in a Debian source package. =item CTRL_REPO_RELEASE @@ -88,12 +88,12 @@ Corresponds to a F<Release> file in a repository. =item CTRL_INDEX_SRC -Corresponds to an entry in a F<Sources> file of a source package +Corresponds to a stanza in a F<Sources> file of a source package repository. =item CTRL_INDEX_PKG -Corresponds to an entry in a F<Packages> file of a binary package +Corresponds to a stanza in a F<Packages> file of a binary package repository. =item CTRL_PKG_SRC @@ -119,7 +119,7 @@ Corresponds to a vendor file in $Dpkg::CONFDIR/origins/. =item CTRL_FILE_STATUS -Corresponds to an entry in dpkg's F<status> file ($Dpkg::ADMINDIR/status). +Corresponds to a stanza in dpkg's F<status> file ($Dpkg::ADMINDIR/status). =item CTRL_CHANGELOG @@ -127,17 +127,17 @@ Corresponds to the output of dpkg-parsechangelog. =item CTRL_COPYRIGHT_HEADER -Corresponds to the header control block in a F<debian/copyright> file in +Corresponds to the header stanza in a F<debian/copyright> file in machine readable format. =item CTRL_COPYRIGHT_FILES -Corresponds to a files control block in a F<debian/copyright> file in +Corresponds to a files stanza in a F<debian/copyright> file in machine readable format. =item CTRL_COPYRIGHT_LICENSE -Corresponds to a license control block in a F<debian/copyright> file in +Corresponds to a license stanza in a F<debian/copyright> file in machine readable format. =item CTRL_TESTS @@ -208,9 +208,9 @@ sub set_options { } elsif ($t == CTRL_REPO_RELEASE) { $$self->{name} = sprintf(g_("repository's %s file"), 'Release'); } elsif ($t == CTRL_INDEX_SRC) { - $$self->{name} = sprintf(g_("entry in repository's %s file"), 'Sources'); + $$self->{name} = sprintf(g_("stanza in repository's %s file"), 'Sources'); } elsif ($t == CTRL_INDEX_PKG) { - $$self->{name} = sprintf(g_("entry in repository's %s file"), 'Packages'); + $$self->{name} = sprintf(g_("stanza in repository's %s file"), 'Packages'); } elsif ($t == CTRL_PKG_SRC) { $$self->{name} = sprintf(g_('%s file'), '.dsc'); } elsif ($t == CTRL_PKG_DEB) { @@ -222,7 +222,7 @@ sub set_options { } elsif ($t == CTRL_FILE_VENDOR) { $$self->{name} = g_('vendor file'); } elsif ($t == CTRL_FILE_STATUS) { - $$self->{name} = g_("entry in dpkg's status file"); + $$self->{name} = g_("stanza in dpkg's status file"); } $self->set_output_order(field_ordered_list($opts{type})); } diff --git a/scripts/Dpkg/Control/Hash.pm b/scripts/Dpkg/Control/Hash.pm index 607ad2f54..8b7f54f59 100644 --- a/scripts/Dpkg/Control/Hash.pm +++ b/scripts/Dpkg/Control/Hash.pm @@ -30,7 +30,7 @@ use parent qw(Dpkg::Control::HashCore); =head1 NAME -Dpkg::Control::Hash - parse and manipulate a block of RFC822-like fields +Dpkg::Control::Hash - parse and manipulate a stanza of deb822 fields =head1 DESCRIPTION diff --git a/scripts/Dpkg/Control/HashCore.pm b/scripts/Dpkg/Control/HashCore.pm index e31ef299e..0bdb81274 100644 --- a/scripts/Dpkg/Control/HashCore.pm +++ b/scripts/Dpkg/Control/HashCore.pm @@ -39,7 +39,7 @@ use overload =head1 NAME -Dpkg::Control::HashCore - parse and manipulate a block of RFC822-like fields +Dpkg::Control::HashCore - parse and manipulate a stanza of deb822 fields =head1 DESCRIPTION @@ -277,7 +277,8 @@ sub parse { # be verified by an OpenPGP backend. $$self->{is_pgp_signed} = 1; } - last; # Finished parsing one block + # Finished parsing one stanza. + last; } elsif ($armor =~ m/^-----BEGIN PGP SIGNED MESSAGE-----[\r\t ]*$/) { $expect_pgp_sig = 1; if ($$self->{allow_pgp} and not $parabody) { diff --git a/scripts/Dpkg/Control/Info.pm b/scripts/Dpkg/Control/Info.pm index 5759ab5ad..e631d66d4 100644 --- a/scripts/Dpkg/Control/Info.pm +++ b/scripts/Dpkg/Control/Info.pm @@ -106,18 +106,19 @@ 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 stanza lacks a '%s' field"), + 'Source'); } while (1) { $cdata = Dpkg::Control->new(type => CTRL_INFO_PKG); last if not $cdata->parse($fh, $desc); push @{$self->{packages}}, $cdata; unless (exists $cdata->{Package}) { - $cdata->parse_error($desc, g_("block lacks the '%s' field"), + $cdata->parse_error($desc, g_("stanza lacks the '%s' field"), 'Package'); } unless (exists $cdata->{Architecture}) { - $cdata->parse_error($desc, g_("block lacks the '%s' field"), + $cdata->parse_error($desc, g_("stanza lacks the '%s' field"), 'Architecture'); } diff --git a/scripts/Dpkg/Control/Tests/Entry.pm b/scripts/Dpkg/Control/Tests/Entry.pm index 001a6f429..cbcd7e888 100644 --- a/scripts/Dpkg/Control/Tests/Entry.pm +++ b/scripts/Dpkg/Control/Tests/Entry.pm @@ -74,7 +74,7 @@ sub parse { return if not $self->SUPER::parse($fh, $desc); if (not exists $self->{'Tests'} and not exists $self->{'Test-Command'}) { - $self->parse_error($desc, g_('block lacks either %s or %s fields'), + $self->parse_error($desc, g_('stanza lacks either %s or %s fields'), 'Tests', 'Test-Command'); } diff --git a/scripts/Dpkg/Control/Types.pm b/scripts/Dpkg/Control/Types.pm index 061201f25..8dd1aa1b2 100644 --- a/scripts/Dpkg/Control/Types.pm +++ b/scripts/Dpkg/Control/Types.pm @@ -57,9 +57,9 @@ between Dpkg::Control and Dpkg::Control::Fields. use constant { CTRL_UNKNOWN => 0, - # First control block in debian/control. + # First control stanza in debian/control. CTRL_INFO_SRC => 1 << 0, - # Subsequent control blocks in debian/control. + # Subsequent control stanza in debian/control. CTRL_INFO_PKG => 1 << 1, # Entry in repository's Sources files. CTRL_INDEX_SRC => 1 << 2, @@ -79,11 +79,11 @@ use constant { CTRL_CHANGELOG => 1 << 9, # Repository's (In)Release file. CTRL_REPO_RELEASE => 1 << 10, - # Header control block in debian/copyright. + # Header control stanza in debian/copyright. CTRL_COPYRIGHT_HEADER => 1 << 11, - # Files control block in debian/copyright. + # Files control stanza in debian/copyright. CTRL_COPYRIGHT_FILES => 1 << 12, - # License control block in debian/copyright. + # License control stanza in debian/copyright. CTRL_COPYRIGHT_LICENSE => 1 << 13, # Package test suite control file in debian/tests/control. CTRL_TESTS => 1 << 14, -- Dpkg.Org's dpkg

