diff options
Diffstat (limited to 'scripts/Dpkg/Substvars.pm')
-rw-r--r-- | scripts/Dpkg/Substvars.pm | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/scripts/Dpkg/Substvars.pm b/scripts/Dpkg/Substvars.pm index 920d1613c..1e9f90173 100644 --- a/scripts/Dpkg/Substvars.pm +++ b/scripts/Dpkg/Substvars.pm @@ -19,7 +19,7 @@ package Dpkg::Substvars; use strict; use warnings; -our $VERSION = '1.05'; +our $VERSION = '1.06'; use Dpkg (); use Dpkg::Arch qw(get_host_arch); @@ -268,6 +268,26 @@ sub set_arch_substvars { $self->set('Arch', get_host_arch(), $attr); } +=item $s->set_desc_substvars() + +Defines source description variables: ${source:Synopsis} and +${source:Extended-Description}. + +These will never be warned about when unused. + +=cut + +sub set_desc_substvars { + my ($self, $desc) = @_; + + my ($synopsis, $extended) = split /\n/, $desc, 2; + + my $attr = SUBSTVAR_ATTR_USED | SUBSTVAR_ATTR_AUTO; + + $self->set('source:Synopsis', $synopsis, $attr); + $self->set('source:Extended-Description', $extended, $attr); +} + =item $s->set_field_substvars($ctrl, $prefix) Defines field variables from a Dpkg::Control object, with each variable @@ -417,6 +437,10 @@ sub output { =head1 CHANGES +=head2 Version 1.06 (dpkg 1.19.0) + +New method: $s->set_desc_substvars(). + =head2 Version 1.05 (dpkg 1.18.11) Obsolete substvar: Emit an error on Source-Version substvar usage. |