This is an automated email from the git hooks/post-receive script. nthykier pushed a commit to branch master in repository lintian.
commit a75dca4366f7cbd9e8110c8d99a402e01336f1f9 Author: Niels Thykier <ni...@thykier.net> Date: Sun Aug 4 21:18:31 2013 +0200 L::P::Package: Reject .dsc files without Source-field Signed-off-by: Niels Thykier <ni...@thykier.net> --- debian/changelog | 5 +++++ lib/Lintian/Processable/Package.pm | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6316ac5..c4c2506 100644 --- a/debian/changelog +++ b/debian/changelog @@ -58,6 +58,11 @@ lintian (2.5.16) UNRELEASED; urgency=low * frontend/lintian: + [NT] Move some handling of overrides to Lintian::Tags. + * lib/Lintian/Processable/Package.pm: + + [NT] Refuse to process .dsc files that are missing the + Source field. This prevents some warnings about using + undefined values. Thanks to Guillem Jover for the + report. (Closes: #718351) * lib/Lintian/Tags.pm: + [NT] Take over some handling of overrides from the frontend. diff --git a/lib/Lintian/Processable/Package.pm b/lib/Lintian/Processable/Package.pm index cccb380..e8ea2f8 100644 --- a/lib/Lintian/Processable/Package.pm +++ b/lib/Lintian/Processable/Package.pm @@ -132,11 +132,10 @@ sub new { $self->{'extra-fields'} = $dinfo; } elsif ($pkg_type eq 'source'){ my $dinfo = get_dsc_info ($pkg_path) or croak "$pkg_path is not valid dsc file"; - my $pkg_name = $dinfo->{source}; + my $pkg_name = $dinfo->{source} // ''; my $pkg_version = $dinfo->{version}; - unless ($pkg_name) { - $pkg_name = _derive_name ($pkg_path, 'dsc') - or croak "Cannot determine the name of $pkg_path"; + if ($pkg_name eq '') { + croak "$pkg_path is missing Source field"; } $self->{pkg_name} = $pkg_name; $self->{pkg_version} = $pkg_version; -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1v63q3-0003cf...@vasks.debian.org