Bug#878515: lintian: Use of uninitialized value $parts[0] in string eq at …/checks/fields.pm line 512. / Use of uninitialized value $parts[-1] in string ne at …/checks/fields.pm lines 521 and 537.
Hi,
a first analysis (might not be able to come up with a patch
immediately, but likely later today):
Axel Beckert wrote:
> Use of uninitialized value $parts[0] in string eq at /usr/share/lintian/checks/fields.pm line 512.
Comes from the first one of these lines:
} elsif ($parts[0] eq 'unknown') {
tag 'section-is-dh_make-template';
} else {
Reason is that the package does have a "Section:" header, but it is
empty (Part of the "dpkg-deb --info" output):
Section:
I propose a new tag "section-is-empty" instead of "W: <packagename>:
unknown-section" for this case, to be caught before the check for
section-is-dh_make-template.
I propose the severity "serious" and the certainty "certain" for this
new tag — in line with "E: <packagename>: extended-description-is-empty".
> Use of uninitialized value $parts[-1] in string ne at /usr/share/lintian/checks/fields.pm line 521.
Comes from the middle one of these lines:
# anything go there.
if ($parts[-1] ne 'oldlibs') {
foreach my $name_section ($NAME_SECTION_MAPPINGS->all()) {
Same cause here. Should be caught before that.
> Use of uninitialized value $parts[-1] in string eq at /usr/share/lintian/checks/fields.pm line 537.
Comes from the first one of these lines:
if ($parts[-1] eq 'debug') {
if($pkg !~ /-dbg(?:sym)?$/) {
Same cause here. Should be caught before that.
Regards, Axel
--
,''`. | Axel Beckert <abe@debian.org>, https://people.debian.org/~abe/
: :' : | Debian Developer, ftp.ch.debian.org Admin
`. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5
`- | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE
Reply to: