From: Frank Lichtenheld Date: Sun, 2 Sep 2007 12:27:39 +0000 (+0200) Subject: Merge from CVS: Fix handling of version 0 and some Perl warnings X-Git-Url: https://git.deb.at/?p=deb%2Fpackages.git;a=commitdiff_plain;h=e8a26d279e317b51711d99ed6af1aafb1d0ceef2 Merge from CVS: Fix handling of version 0 and some Perl warnings revision 1.17 date: 2007-07-26 11:58:34 +0200; author: djpig; state: Exp; lines: +9 -1 Initialize %stats hash to avoid perl warnings ---------------------------- revision 1.16 date: 2007-07-23 17:59:14 +0200; author: djpig; state: Exp; lines: +1 -1 The version number can be just 0, don't fall over that --- diff --git a/bin/extract_files b/bin/extract_files index 2d4dbdc..c129153 100755 --- a/bin/extract_files +++ b/bin/extract_files @@ -72,7 +72,15 @@ my %opthash = ( 'help' => \$help, ); -my (%src_packages, %bin_packages, %cache, %stats); +my (%src_packages, %bin_packages, %cache); + +my %stats = ( + src_pkgs => 0, + src_cache => 0, + already_extracted => 0, + bin_pkgs => 0, + bin_cache => 0, + ); Getopt::Long::config('no_getopt_compat', 'no_auto_abbrev'); @@ -529,7 +537,7 @@ sub read_dsc { dsc => $dscname, }; - unless( $pkg_data->{src_name} && $pkg_data->{src_version} + unless( $pkg_data->{src_name} && defined($pkg_data->{src_version}) && $pkg_data->{dsc} ) { use Data::Dumper; do_error( "something fishy happened.\n", Dumper( $pkg_data ) );