[U-Boot] Patman failure on Linux Mint 14

Hi there!
Patman for some reason "doesn't work for me". It won't find commits from the sandbox/repo, but wants me to specify -c manually. Then it won't detect or cannot grok subject prefixes and fails to determine email addresses. From the documentation I see how useful the tool is and feel how great and desirable it is to have such a tool at hand when iterating a series through review. It's a pity that it won't run here. Since it works for others, the problem must be in my setup.
The git history suggests that Python 2.7.4 is required, while my distribution (Linux Mint 14, derived from Ubuntu 12.10) ships with 2.7.3.
OTOH this very Python version works for others, and a local installation of 2.7.5 (default configure except for --prefix $HOME) doesn't help either.
The unit test output is rather lengthy, yet apparently condenses into just two spots and a lot of followup errors:
The testIndent() case in test.py won't pass (succeeds although it's supposed to fail). Changing 'tab' in GetData() from a verbatim tab in quotes into an explicit '\t' doesn't help (but visually more clearly reflects the specific type of whitespace). Running the script under 'env LC_ALL=C' didn't help either. Is this some language or locale specific stuff that can be overcome "from outside", or do I have a more severe problem with the Python runtime where string operation and whitespace handling isn't dependable?
Email address handling fails for the BuildEmailList(), EmailPatches(), and LookupEmail() routines, and all of them for the same reason of missing 'fileno' member in what's supposed to be a file stream. The specific error output is:
AttributeError: _SpoofOut instance has no attribute 'fileno'
After searching the web I got that much: When run under test (doctest), file output is implemented by the _SpoofOut class to catch programs' output, to compare runtime behaviour against expectations. While this stream setup mostly works for the purpose of I/O and testing, it specifically lacks the 'fileno' member and thus breaks those uses which rely on this property.
Can't tell whether this condition applies to "regular application invocation" as well or to the specific libraries or abstractions used in the patman setup (saw 'fileno' references in terminal and process related stuff, but don't know enough Python to really tell what to do there). Just in case, I ran the unit test from within screen(1) as well as without it in a mere terminal.
The local setup is:
$ lsb_release -d -s Linux Mint 14 Nadia $ python --version Python 2.7.5 $ git describe v2013.07-rc3-1-g1c2d113 (one patch, the patman doc update)
Am I missing some external dependencies or proper configuration (either in the system, in Python, in git, or in patman)? What can I do to better diagnose the issue or make patman work here as well? It's so great a tool!
virtually yours Gerhard Sittig

Hi Gerhard,
On 14/07/2013 12:18, Gerhard Sittig wrote:
Hi there!
Patman for some reason "doesn't work for me". It won't find commits from the sandbox/repo, but wants me to specify -c manually. Then it won't detect or cannot grok subject prefixes and fails to determine email addresses. From the documentation I see how useful the tool is and feel how great and desirable it is to have such a tool at hand when iterating a series through review. It's a pity that it won't run here. Since it works for others, the problem must be in my setup.
The git history suggests that Python 2.7.4 is required, while my distribution (Linux Mint 14, derived from Ubuntu 12.10) ships with 2.7.3.
It is not definetly a problem. It works on Ubuntu 12.04 LTS (python 2.7.3), as well as on later versions.
One point could be your ~/.patman file. You should define an alias for each pattern in the subject line. Let's take as example the commit 7d47d1caa01682fd7b12631409927139f09ba041, it has a subject line:
arm: omap4: panda: Add reading of the board revision
patman tries to resolv an e-mail address for each pattern, and I have in my ~/.patman an entry for each of them (arm-->Albert, omap and panda --> Tom).
The other question is if you have set up the toolchain when you run patman. If you set up ELDK, some tools are taken from the toolchain instead from the PC, and patman fails - sometimes with weird errors. I usually run patman in a shell where I have not set the environment for the cross-compiler.
OTOH this very Python version works for others, and a local installation of 2.7.5 (default configure except for --prefix $HOME) doesn't help either.
The unit test output is rather lengthy, yet apparently condenses into just two spots and a lot of followup errors:
The testIndent() case in test.py won't pass (succeeds although it's supposed to fail). Changing 'tab' in GetData() from a verbatim tab in quotes into an explicit '\t' doesn't help (but visually more clearly reflects the specific type of whitespace). Running the script under 'env LC_ALL=C' didn't help either. Is this some language or locale specific stuff that can be overcome "from outside", or do I have a more severe problem with the Python runtime where string operation and whitespace handling isn't dependable?
It seems to me too much and an indication that your environment could be responsible for this issue. I do not think that your Ubuntu derivative is the problem.
Have you tried with a fresh shell or by logging with another user if you have the same errors ?
Am I missing some external dependencies or proper configuration (either in the system, in Python, in git, or in patman)?
IMHO you get in python an error by "import" if something is missing, and this is not your case. By the way, I have not set up anything, and patman works flawlessly.
What can I do to better diagnose the issue or make patman work here as well? It's so great a tool!
My first suggestion should be to try to check your environment, or try with another user if you have not changed for some reason /etc/profile.
Regards, Stefano
participants (2)
-
Gerhard Sittig
-
Stefano Babic