Package: devscripts
Version: 2.13.8
Severity: minor
Tags: patch

Hi

If debian/copyright is not in copyright-format 1.0, say

,---- [ debian/copyright ]
| Format-Specification: 
http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=166
| Upstream-Name: Archive-Any
| Upstream-Contact: Clint Moore <cmo...@cpan.org>
| Source: https://metacpan.org/release/Archive-Any/
`----

uscan issues a unitialized value in pattern match warning for uscan on
line 1505: 

Use of uninitialized value in pattern match (m//) at /usr/bin/uscan line 1505.

Attached is a patch which checks also for if $data->{'format'} is
actually defined.

Regards,
Salvatore
>From 53cf2ce057faae7ab6a808e1fac8d6fdfdde7f71 Mon Sep 17 00:00:00 2001
From: Salvatore Bonaccorso <car...@debian.org>
Date: Sat, 21 Dec 2013 23:25:38 +0100
Subject: [PATCH] Fix unitialized value warning when copyright is not in
 copyright-format 1.0

If debian/copyright is not in copyright-format 1.0 but say in old
revision of dep5, uscan issues a uninitialized value in pattern match
(m//) at /usr/bin/uscan line 1505.
---
 scripts/uscan.pl | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/uscan.pl b/scripts/uscan.pl
index 0ffe9f2..19f29d6 100755
--- a/scripts/uscan.pl
+++ b/scripts/uscan.pl
@@ -1502,7 +1502,11 @@ EOF
 	} or do {
 	  undef $data;
 	};
-	if ($data && $data->{'format'} =~ m{^$okformat/?$} && $data->{'files-excluded'} ) {
+    if (   $data
+        && defined $data->{'format'}
+        && $data->{'format'} =~ m{^$okformat/?$}
+        && $data->{'files-excluded'} )
+    {
 	    my $tempdir = tempdir ( "uscanXXXX", TMPDIR => 1, CLEANUP => 1 );
 	    my $globpattern = "*";
 	    my $hidden = ".[!.]*";
-- 
1.8.5.2

Reply via email to