]> git.deb.at Git - deb/packages.git/commitdiff
Merge from CVS: Fix handling of version 0 and some Perl warnings
authorFrank Lichtenheld <frank@lichtenheld.de>
Sun, 2 Sep 2007 12:27:39 +0000 (14:27 +0200)
committerFrank Lichtenheld <frank@lichtenheld.de>
Sun, 2 Sep 2007 12:27:39 +0000 (14:27 +0200)
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

bin/extract_files

index 2d4dbdcd4ab64e1f90d0d0a052aa46f826760419..c129153c7b26674e409cb8df21e478de5e52bff7 100755 (executable)
@@ -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 ) );