Description of problem: I just ran fedora-review and saw this output: Illegal return from /usr/lib/python2.7/site-packages/FedoraReview/scripts/check-large-data.sh, code 80, output: stdout:None stderr:./review-env.sh: line 2: unset: `}': not a valid identifier Illegal return from /usr/lib/python2.7/site-packages/FedoraReview/scripts/check-src-opt.sh, code 80, output: stdout:None stderr:./review-env.sh: line 2: unset: `}': not a valid identifier This is line 2 of the generated review-env.sh file: unset $(env | sed 's/=.*//') Sure enough, if I run "env", I see this: module=() { eval `/usr/bin/modulecmd bash $*` } on two separate lines. I think that fedora-review can and should avoid such junk in the environment. Changing that line in review-env.sh to this works: unset $(env | sed -n 's/=.*//p') Version-Release number of selected component (if applicable): fedora-review-0.3.1-2.fc17.noarch How reproducible: Always (in my environment). Steps to Reproduce: 1. Have a function definition in the environment, such as the module() definition above, that contains embedded newlines, so that the closing curly brace is on a line by itself. 2. Run fedora-review Actual results: fedora-review spews complaints about the curly brace. Expected results: fedora-review should ignore the curly brace. Additional info:
Many thanks for report and, not least, some sed wizardry. This is now in devel: https://fedorahosted.org/FedoraReview/changeset/9f9c261ab1a7741da0cbe436b67088224b84897a However, it might take some time before there's a new release, we just shipped 3.1.1. If this bug is annoying enough for you to do something you could either try the devel version as described in https://fedorahosted.org/FedoraReview/wiki or apply the patch below to current f-r (you find the shell_api.py in /usr/share/fedora-review/plugins) Once again: thanks! diff --git a/plugins/shell_api.py b/plugins/shell_api.py index 4761386..6d21d02 100644 --- a/plugins/shell_api.py +++ b/plugins/shell_api.py @@ -32,7 +32,7 @@ from FedoraReview import AbstractRegistry, GenericCheck from FedoraReview import ReviewDirs, Settings, XdgDirs ENVIRON_TEMPLATE = """ -unset $(env | sed 's/=.*//') +unset $(env | sed -n 's/=.*//p') PATH=/bin:/usr/bin:/sbin/:/usr/sbin FR_FLAGS_generator
fedora-review-0.3.1-3.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/fedora-review-0.3.1-3.fc17
fedora-review-0.3.1-3.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/fedora-review-0.3.1-3.el6
fedora-review-0.3.1-3.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/fedora-review-0.3.1-3.fc18
fedora-review-0.3.1-3.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/fedora-review-0.3.1-3.fc16
Package fedora-review-0.3.1-3.el6: * should fix your issue, * was pushed to the Fedora EPEL 6 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=epel-testing fedora-review-0.3.1-3.el6' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-EPEL-2012-13487/fedora-review-0.3.1-3.el6 then log in and leave karma (feedback).
fedora-review-0.3.1-3.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.
fedora-review-0.3.1-3.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
fedora-review-0.3.1-3.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.
fedora-review-0.3.1-3.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.