diff options
author | Olivier Thauvin <nanardon@mandriva.org> | 2007-11-11 18:33:28 +0000 |
---|---|---|
committer | Olivier Thauvin <nanardon@mandriva.org> | 2007-11-11 18:33:28 +0000 |
commit | 574b9985018f6a165fe80c9c5f82f7534260384e (patch) | |
tree | d9df8960ddcae32df03c7e159fad7e4a526f20a1 /lib/MDV/Distribconf/Checks.pm | |
parent | 20ee54a418e756f87937983d8f19a3d7125f1c1c (diff) | |
download | perl-MDV-Distribconf-574b9985018f6a165fe80c9c5f82f7534260384e.tar perl-MDV-Distribconf-574b9985018f6a165fe80c9c5f82f7534260384e.tar.gz perl-MDV-Distribconf-574b9985018f6a165fe80c9c5f82f7534260384e.tar.bz2 perl-MDV-Distribconf-574b9985018f6a165fe80c9c5f82f7534260384e.tar.xz perl-MDV-Distribconf-574b9985018f6a165fe80c9c5f82f7534260384e.zip |
- fix bad hdlist format detection when comparing index to media content
Diffstat (limited to 'lib/MDV/Distribconf/Checks.pm')
-rw-r--r-- | lib/MDV/Distribconf/Checks.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/MDV/Distribconf/Checks.pm b/lib/MDV/Distribconf/Checks.pm index 86d0a17..cfeea65 100644 --- a/lib/MDV/Distribconf/Checks.pm +++ b/lib/MDV/Distribconf/Checks.pm @@ -258,8 +258,8 @@ sub get_index_sync_offset { -f $hdlist && -f $synthesis or return 0; # avoid warnings my ($inp, $ind) = MDV::Distribconf::Utils::hdlist_vs_dir($hdlist, $rpmspath); - if (@{$inp || []} + @{$ind || []}) { - return (0, scalar(@{$inp || []}), scalar(@{$ind || []})); + if (!defined($inp) || (@{$inp || []} + @{$ind || []})) { + return (0, (defined($inp) ? scalar(@{$inp || []}) : undef), scalar(@{$ind || []})); } return (1, 0, 0); } @@ -328,7 +328,7 @@ sub checkdistrib { $fhout, 'UNSYNC_HDLIST', "hdlist for media `%s' is not sync with its rpms" . - (defined($inhd) ? " (+%d -%d rpms)" : ' (no hdlist)'), + (defined($inhd) ? " (+%d -%d rpms)" : ' (missing or unreadable hdlist: +%d rpms)'), $media, $indir, $inhd ); } |