All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] Patman failure on Linux Mint 14
@ 2013-07-14 10:18 Gerhard Sittig
  2013-07-15  7:04 ` Stefano Babic
  0 siblings, 1 reply; 2+ messages in thread
From: Gerhard Sittig @ 2013-07-14 10:18 UTC (permalink / raw)
  To: u-boot

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
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot] Patman failure on Linux Mint 14
  2013-07-14 10:18 [U-Boot] Patman failure on Linux Mint 14 Gerhard Sittig
@ 2013-07-15  7:04 ` Stefano Babic
  0 siblings, 0 replies; 2+ messages in thread
From: Stefano Babic @ 2013-07-15  7:04 UTC (permalink / raw)
  To: u-boot

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

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-15  7:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-14 10:18 [U-Boot] Patman failure on Linux Mint 14 Gerhard Sittig
2013-07-15  7:04 ` Stefano Babic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.