From 574b9985018f6a165fe80c9c5f82f7534260384e Mon Sep 17 00:00:00 2001 From: Olivier Thauvin Date: Sun, 11 Nov 2007 18:33:28 +0000 Subject: - fix bad hdlist format detection when comparing index to media content --- lib/MDV/Distribconf/Checks.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/MDV/Distribconf/Checks.pm') 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 ); } -- cgit v1.2.1