summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/MDV/Distribconf/Checks.pm6
-rw-r--r--lib/MDV/Distribconf/Utils.pm2
2 files changed, 4 insertions, 4 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
);
}
diff --git a/lib/MDV/Distribconf/Utils.pm b/lib/MDV/Distribconf/Utils.pm
index 818eb77..ea0bbb5 100644
--- a/lib/MDV/Distribconf/Utils.pm
+++ b/lib/MDV/Distribconf/Utils.pm
@@ -54,7 +54,7 @@ sub hdlist_vs_dir {
}
} while (scalar(@rpms) || scalar(@hdrs));
} else {
- return;
+ return(undef, [ map { m:.*/+(.*):; $1 } @rpms ]);
}
return (\@only_pack, \@only_dir);
}