From 20b4b20c3df7fbede8ed99d6e13148c3f5719ec6 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Tue, 9 Jul 2002 15:06:11 +0000 Subject: 0.08-4mdk --- URPM/Build.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'URPM/Build.pm') diff --git a/URPM/Build.pm b/URPM/Build.pm index 9e60c02..e3029f7 100644 --- a/URPM/Build.pm +++ b/URPM/Build.pm @@ -12,6 +12,7 @@ use strict; sub parse_rpms_build_headers { my ($urpm, %options) = @_; my ($dir, %cache, @headers, %names); + local (*DIR, *F); #- check for mandatory options. if (@{$options{rpms} || []} > 0) { @@ -23,7 +24,6 @@ sub parse_rpms_build_headers { #- examine cache if it contains any headers which will be much faster to read #- than parsing rpm file directly. unless ($options{clean}) { - local *DIR; opendir DIR, $dir; while (my $file = readdir DIR) { $file =~ /(.+?-[^:\-]+-[^:\-]+\.[^:\-\.]+)(?::(\S+))?$/ or next; @@ -53,8 +53,7 @@ sub parse_rpms_build_headers { print STDERR "$dir/$filename\n"; unless (-s "$dir/$filename") { - local *F; - open F, ">$dir/$filename"; + open F, ">$dir/$filename" or die "unable to open $dir/$filename for writing\n"; $pkg->build_header(fileno *F); close F; } -- cgit v1.2.1