aboutsummaryrefslogtreecommitdiffstats
path: root/perl.prov
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-07-25 17:01:57 +0000
committerThierry Vignaud <tv@mageia.org>2012-07-25 17:01:57 +0000
commitf1464d5fa918583be521af14e861de34347d0f2b (patch)
tree36167711c360349ab28f57e3589fb064dca8053f /perl.prov
parentfb15a0b882f7e3e7c6bc11ad2e7da77e37cd63f6 (diff)
downloadrpm-setup-f1464d5fa918583be521af14e861de34347d0f2b.tar
rpm-setup-f1464d5fa918583be521af14e861de34347d0f2b.tar.gz
rpm-setup-f1464d5fa918583be521af14e861de34347d0f2b.tar.bz2
rpm-setup-f1464d5fa918583be521af14e861de34347d0f2b.tar.xz
rpm-setup-f1464d5fa918583be521af14e861de34347d0f2b.zip
sync with upstream rpm.org: "Make perl.{req,prov} warn about unreadable files"
(Ville Skyttä, 2010-02-25)
Diffstat (limited to 'perl.prov')
-rwxr-xr-xperl.prov6
1 files changed, 5 insertions, 1 deletions
diff --git a/perl.prov b/perl.prov
index 8c0e890..db6d5b2 100755
--- a/perl.prov
+++ b/perl.prov
@@ -85,7 +85,11 @@ sub process_file {
my ($file) = @_;
- open(FILE, "<$file") || return;
+ if (!open(FILE, $file)) {
+ warn("$0: Warning: Could not open file '$file' for reading: $!\n");
+ return;
+ }
+
my ($package, $version, $incomment, $inover) = ();