summaryrefslogtreecommitdiffstats
path: root/lib/MDV
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mandriva.org>2007-11-14 00:40:56 +0000
committerOlivier Thauvin <nanardon@mandriva.org>2007-11-14 00:40:56 +0000
commitc608c2c31212dbb185391f13075191c4d17eaf07 (patch)
treeea9db7a28bd27606eb0e2d3fce70b4d997e762c7 /lib/MDV
parent4b9053b6ce833edb12fa711b9e2052424cd98513 (diff)
downloadperl-MDV-Distribconf-c608c2c31212dbb185391f13075191c4d17eaf07.tar
perl-MDV-Distribconf-c608c2c31212dbb185391f13075191c4d17eaf07.tar.gz
perl-MDV-Distribconf-c608c2c31212dbb185391f13075191c4d17eaf07.tar.bz2
perl-MDV-Distribconf-c608c2c31212dbb185391f13075191c4d17eaf07.tar.xz
perl-MDV-Distribconf-c608c2c31212dbb185391f13075191c4d17eaf07.zip
- avoid warning if hdlist does not exists
Diffstat (limited to 'lib/MDV')
-rw-r--r--lib/MDV/Distribconf/Utils.pm2
1 files changed, 1 insertions, 1 deletions
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 || []};