From c608c2c31212dbb185391f13075191c4d17eaf07 Mon Sep 17 00:00:00 2001 From: Olivier Thauvin Date: Wed, 14 Nov 2007 00:40:56 +0000 Subject: - avoid warning if hdlist does not exists --- lib/MDV/Distribconf/Utils.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/MDV') diff --git a/lib/MDV/Distribconf/Utils.pm b/lib/MDV/Distribconf/Utils.pm index ea0bbb5..ecdb7ce 100644 --- a/lib/MDV/Distribconf/Utils.pm +++ b/lib/MDV/Distribconf/Utils.pm @@ -31,7 +31,7 @@ sub hdlist_vs_dir { push(@rpms, glob("$dir/*.rpm")); } @rpms = sort { ($b =~ m:.*/+(.*):)[0] cmp ($a =~ m:.*/+(.*):)[0] } @rpms; - if (my $pack = MDV::Packdrakeng->open(archive => $hdlist)) { + if (-f $hdlist and my $pack = MDV::Packdrakeng->open(archive => $hdlist)) { my $hdlisttime = (stat($hdlist))[9]; my (undef, $files, undef) = $pack->getcontent(); my @hdrs = sort { $b cmp $a } map { "$_.rpm" } @{$files || []}; -- cgit v1.2.1