summaryrefslogtreecommitdiff
path: root/scripts/Dpkg
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Dpkg')
-rw-r--r--scripts/Dpkg/Control/FieldsCore.pm8
-rw-r--r--scripts/Dpkg/Substvars.pm26
2 files changed, 29 insertions, 5 deletions
diff --git a/scripts/Dpkg/Control/FieldsCore.pm b/scripts/Dpkg/Control/FieldsCore.pm
index 74c54e686..b100366e1 100644
--- a/scripts/Dpkg/Control/FieldsCore.pm
+++ b/scripts/Dpkg/Control/FieldsCore.pm
@@ -268,7 +268,7 @@ our %FIELDS = (
},
'description' => {
name => 'Description',
- allowed => ALL_PKG | CTRL_FILE_CHANGES | CTRL_REPO_RELEASE,
+ allowed => ALL_SRC | ALL_PKG | CTRL_FILE_CHANGES | CTRL_REPO_RELEASE,
},
'disclaimer' => {
name => 'Disclaimer',
@@ -618,14 +618,14 @@ our %FIELD_ORDER = (
],
CTRL_PKG_SRC() => [
qw(format source binary architecture version origin maintainer
- uploaders homepage standards-version vcs-browser
+ uploaders homepage description standards-version vcs-browser
vcs-arch vcs-bzr vcs-cvs vcs-darcs vcs-git vcs-hg vcs-mtn
vcs-svn testsuite testsuite-triggers), @src_dep_fields,
qw(package-list), @src_checksums_fields, qw(files)
],
CTRL_INDEX_SRC() => [
- qw(format package binary architecture version priority section
- origin maintainer uploaders homepage standards-version vcs-browser
+ qw(format package binary architecture version priority section origin
+ maintainer uploaders homepage description standards-version vcs-browser
vcs-arch vcs-bzr vcs-cvs vcs-darcs vcs-git vcs-hg vcs-mtn vcs-svn
testsuite testsuite-triggers), @src_dep_fields,
qw(package-list directory), @src_checksums_fields, qw(files)
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.