diff options
author | Raphaël Hertzog <hertzog@debian.org> | 2011-06-25 10:08:03 +0200 |
---|---|---|
committer | Raphaël Hertzog <hertzog@debian.org> | 2011-06-25 10:35:59 +0200 |
commit | 1c1653ef4d7a6d461d4c2168d8a078a8a11596db (patch) | |
tree | 1be2837cb5b7de008ae107102c4f14e38268a8f3 /scripts/Dpkg/Control | |
parent | 8eed1ffef9b85ccf71190cb7f36788f2994222ed (diff) | |
download | dpkg-1c1653ef4d7a6d461d4c2168d8a078a8a11596db.tar.gz |
dpkg-source: add some supplementary checks of debian/control
We're now ensuring that debian/control contains a source entry
and at least one entry for a binary package. And we also ensure
that the Architecture field is present. This a new restriction
but it's really in-line with the change made in dpkg where we
complain of the lack of this field.
Reported-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 'scripts/Dpkg/Control')
-rw-r--r-- | scripts/Dpkg/Control/Info.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/Dpkg/Control/Info.pm b/scripts/Dpkg/Control/Info.pm index 556c531c8..d7ec187a1 100644 --- a/scripts/Dpkg/Control/Info.pm +++ b/scripts/Dpkg/Control/Info.pm @@ -107,8 +107,12 @@ sub parse { last if not $cdata->parse($fh, $desc); push @{$self->{packages}}, $cdata; unless (exists $cdata->{Package}) { - syntaxerr($desc, _g("block lacks a package field")); + syntaxerr($desc, _g("block lacks the '%s' field"), "Package"); } + unless (exists $cdata->{Architecture}) { + syntaxerr($desc, _g("block lacks the '%s' field"), "Architecture"); + } + } } |