diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-01-04 11:06:39 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-01-04 11:06:39 +0000 |
commit | 5e7afc53abd4d1c8d3bcdea6cf03f96f2fa9c578 (patch) | |
tree | a876dd8091210fae3796639c80b4a508b4a0e080 /URPM | |
parent | 0700aed455282b62d6b20466c97428126ed03ee7 (diff) | |
download | perl-URPM-5e7afc53abd4d1c8d3bcdea6cf03f96f2fa9c578.tar perl-URPM-5e7afc53abd4d1c8d3bcdea6cf03f96f2fa9c578.tar.gz perl-URPM-5e7afc53abd4d1c8d3bcdea6cf03f96f2fa9c578.tar.bz2 perl-URPM-5e7afc53abd4d1c8d3bcdea6cf03f96f2fa9c578.tar.xz perl-URPM-5e7afc53abd4d1c8d3bcdea6cf03f96f2fa9c578.zip |
Croak if build_base_files can't write files
Diffstat (limited to 'URPM')
-rw-r--r-- | URPM/Build.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/URPM/Build.pm b/URPM/Build.pm index 81e6ca3..0b945b7 100644 --- a/URPM/Build.pm +++ b/URPM/Build.pm @@ -489,7 +489,7 @@ sub build_base_files { my ($urpm, %options) = @_; if ($options{depslist}) { - open my $fh, ">$options{depslist}"; + open my $fh, ">", $options{depslist} or die "Can't write to $options{depslist}: $!\n";; foreach (0 .. $#{$urpm->{depslist}}) { my $pkg = $urpm->{depslist}[$_]; @@ -500,7 +500,7 @@ sub build_base_files { } if ($options{provides}) { - open my $fh, ">$options{provides}"; + open my $fh, ">", $options{provides} or die "Can't write to $options{provides}: $!\n"; while (my ($k, $v) = each %{$urpm->{provides}}) { printf $fh "%s\n", join '@', $k, map { scalar $urpm->{depslist}[$_]->fullname } keys %{$v || {}}; } @@ -510,7 +510,7 @@ sub build_base_files { if ($options{compss}) { my %p; - open my $fh, ">$options{compss}"; + open my $fh, ">", $options{compss} or die "Can't write to $options{compss}: $!\n"; foreach (@{$urpm->{depslist}}) { $_->group or next; push @{$p{$_->group} ||= []}, $_->name; |