launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #02614
[Merge] lp:~benji/launchpad/make-lint-ignore-grep-env into lp:launchpad
Benji York has proposed merging lp:~benji/launchpad/make-lint-ignore-grep-env into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~benji/launchpad/make-lint-ignore-grep-env/+merge/49884
This is a small change to the bin/lint.sh template to isolate grep from
the various environment variables that can affect its operation in ways
undesirable in the context of the script.
In particular, I have "-n" in my GREP_OPTIONS environment variable which
causes "make lint" to generate this exception (note the leading "1:"):
Traceback (most recent call last):
File "/usr/bin/pocketlint", line 6, in <module>
sys.exit(main(sys.argv))
File "/usr/lib/pymodules/python2.6/pocketlint/formatcheck.py", line 519, in main
check_sources(sources, reporter)
File "/usr/lib/pymodules/python2.6/pocketlint/formatcheck.py", line 500, in check_sources
with open(file_path) as file_:
IOError: [Errno 2] No such file or directory: '1:lib/canonical/launchpad/emailtemplates/bug-notification.txt'
--
https://code.launchpad.net/~benji/launchpad/make-lint-ignore-grep-env/+merge/49884
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~benji/launchpad/make-lint-ignore-grep-env into lp:launchpad.
=== modified file 'buildout-templates/bin/lint.sh.in'
--- buildout-templates/bin/lint.sh.in 2010-09-27 11:50:51 +0000
+++ buildout-templates/bin/lint.sh.in 2011-02-15 21:57:08 +0000
@@ -107,7 +107,7 @@
# Sample data contains auto generated files with long lines.
-pocketlint_files=`echo "$files" | grep -v "$sample_dir"`
+pocketlint_files=`echo "$files" | env -i grep -v "$sample_dir"`
if [ -z "$pocketlint_files" ]; then
exit 0
fi