diff options
Diffstat (limited to 'lib/MDV')
-rw-r--r-- | lib/MDV/Distribconf/Utils.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/MDV/Distribconf/Utils.pm b/lib/MDV/Distribconf/Utils.pm index 1551789..67cc4ee 100644 --- a/lib/MDV/Distribconf/Utils.pm +++ b/lib/MDV/Distribconf/Utils.pm @@ -29,7 +29,7 @@ sub hdlist_vs_dir { my (@only_pack, @only_dir); my @rpms; foreach my $dir (@dir) { - push(@rpms, grep { -e $_ } glob("$dir/*.rpm")); + push(@rpms, glob("$dir/*.rpm")); } @rpms = sort { ($b =~ m:.*/+(.*):)[0] cmp ($a =~ m:([^/]+)$:)[0] } @rpms; if (-f $hdlist and my $pack = MDV::Packdrakeng->open(archive => $hdlist)) { @@ -40,10 +40,10 @@ sub hdlist_vs_dir { do { my $base_r = ($r =~ m:([^/]+)$:)[0] || ''; my $comp = ($base_r cmp $h); - my $st_d = (stat($r))[9] if ($r); - if ($comp < 0) { push(@only_pack, $h); } + my $st_d = $r ? (stat($r))[9] : 0; + if ($comp < 0 || !defined($st_d)) { push(@only_pack, $h); } elsif ($comp > 0) { push(@only_dir, $base_r); } - elsif ($r && (!defined($st_d) || $st_d > $hdlisttime)) { + elsif ($r && ($st_d > $hdlisttime)) { push(@only_pack, $h); push(@only_dir, ($r =~ m:.*/+(.*):)[0]); } |