]> git.donarmstrong.com Git - debbugs.git/commitdiff
skip maintainer files if they are empty *or* undef
authorDon Armstrong <don@donarmstrong.com>
Thu, 6 Jul 2017 01:17:02 +0000 (18:17 -0700)
committerDon Armstrong <don@donarmstrong.com>
Thu, 6 Jul 2017 01:17:22 +0000 (18:17 -0700)
Debbugs/Common.pm
Debbugs/Packages.pm

index 2bc3e0dfe3280143f0243b6ae8df189376ead1a7..9305d3f161e27bf410394b3412d385b9c9fb617d 100644 (file)
@@ -364,7 +364,7 @@ sub package_maintainer {
        for my $fn (@config{('source_maintainer_file',
                             'source_maintainer_file_override',
                             'pseudo_maint_file')}) {
-           next unless defined $fn;
+           next unless defined $fn and length $fn;
            if (not -e $fn) {
                warn "Missing source maintainer file '$fn'";
                next;
@@ -380,7 +380,7 @@ sub package_maintainer {
        for my $fn (@config{('maintainer_file',
                             'maintainer_file_override',
                             'pseudo_maint_file')}) {
-           next unless defined $fn;
+           next unless defined $fn and length $fn;
            if (not -e $fn) {
                warn "Missing maintainer file '$fn'";
                next;
@@ -471,7 +471,8 @@ sub getpseudodesc {
     return $_pseudodesc if defined $_pseudodesc;
     $_pseudodesc = {};
     __add_to_hash($config{pseudo_desc_file},$_pseudodesc) if
-       defined $config{pseudo_desc_file};
+       defined $config{pseudo_desc_file} and
+       length $config{pseudo_desc_file};
     return $_pseudodesc;
 }
 
index 27117aba47c3b50bc9738e530bd0b1022544e1b8..6974c1778d1a3fc4b1d71cbc45f15793ada267d6 100644 (file)
@@ -72,7 +72,8 @@ our $_pkgcomponent;
 our $_srcpkg;
 sub getpkgsrc {
     return $_pkgsrc if $_pkgsrc;
-    return {} unless defined $Debbugs::Packages::gPackageSource;
+    return {} unless defined $config{package_source} and
+       length $config{package_source};
     my %pkgsrc;
     my %pkgcomponent;
     my %srcpkg;