aboutsummaryrefslogtreecommitdiffstats
path: root/URPM
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-07-09 15:06:11 +0000
committerFrancois Pons <fpons@mandriva.com>2002-07-09 15:06:11 +0000
commit20b4b20c3df7fbede8ed99d6e13148c3f5719ec6 (patch)
tree991294da9faccab3042595e155741fa121aeb074 /URPM
parent6cac8418f13ba12863ca93360e189e70161d8261 (diff)
downloadperl-URPM-20b4b20c3df7fbede8ed99d6e13148c3f5719ec6.tar
perl-URPM-20b4b20c3df7fbede8ed99d6e13148c3f5719ec6.tar.gz
perl-URPM-20b4b20c3df7fbede8ed99d6e13148c3f5719ec6.tar.bz2
perl-URPM-20b4b20c3df7fbede8ed99d6e13148c3f5719ec6.tar.xz
perl-URPM-20b4b20c3df7fbede8ed99d6e13148c3f5719ec6.zip
0.08-4mdk
Diffstat (limited to 'URPM')
-rw-r--r--URPM/Build.pm5
1 files changed, 2 insertions, 3 deletions
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;
}