[Reproducible-commits] [perl] 01/06: Report inaccesible file on failed require
Jérémy Bobbio
lunar at moszumanska.debian.org
Tue Apr 7 11:47:14 UTC 2015
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch pu/reproducible_builds
in repository perl.
commit a7550ec974eef6efeb71cc1969d7b7efe93a7378
Author: Petr Písař <ppisar at redhat.com>
Date: Fri Nov 21 10:48:51 2014 +0100
Report inaccesible file on failed require
Commit 2433d39e6 (require should die if a file exists but can't be
read) made first failed opened file fatal as request in
[perl #113422]. However error message produced in that case is not
much helpful in identifying which file ound not been accessed:
$ LANG=C perl -I/root -e 'require strict'
Can't locate strict.pm: Permission denied at -e line 1.
This patch adds the name of the failed file to the message to help
identify which @INC directory is erroneous:
$ LANG=C ./perl -I/root -I./lib -e 'require strict'
Can't locate strict.pm: /root/strict.pm: Permission denied at -e line 1.
Signed-off-by: Petr Písař <ppisar at redhat.com>
Bug: https://rt.perl.org/Public/Bug/Display.html?id=123270
Bug-Debian: http://bugs.debian.org/781120
Patch-Name: fixes/failed_require_diagnostics.diff
---
pp_ctl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pp_ctl.c b/pp_ctl.c
index 11314ec..ce51abc 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -4050,7 +4050,8 @@ PP(pp_require)
if (PL_op->op_type == OP_REQUIRE) {
if(saved_errno == EMFILE || saved_errno == EACCES) {
/* diag_listed_as: Can't locate %s */
- DIE(aTHX_ "Can't locate %s: %s", name, Strerror(saved_errno));
+ DIE(aTHX_ "Can't locate %s: %s: %s",
+ name, tryname, Strerror(saved_errno));
} else {
if (namesv) { /* did we lookup @INC? */
AV * const ar = GvAVn(PL_incgv);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/perl.git
More information about the Reproducible-commits
mailing list