Skip to content

Refactor and improve full help output from tools

Paul Barker u-boot 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 2 repliesIn review
  2. v32 patches 0 repliesSuperseded
  3. v22 patches 2 repliesSuperseded

Changes in v4 from the cover letter

* I found some more Python madness:

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2tools: Refactor full help printingtools/binman/control.py tools/buildman/control.py tools/patman/main.py +1 more+24 -201 reply
2/2tools: Handle PAGER containing argumentstools/patman/tools.py+6 -41 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/2] Refactor and improve full help output from tools

Changes from v3:
* I found some more Python madness:

>>> bool([])
False
>>> bool([None])
True

So we need to ensure that if shlex.which(less) returns None we don't set pager to [None] else we won't be able to fall back to using more as the pager.

Apologies for the noise in having to send v4 so quickly!

Changes from v2:
* Handle the case where PAGER is unset. For some absolutely crazy reason shlex.split(None) reads the string to split from stdin so we need to ensure that os.getenv() returns an empty string instead of None if PAGER is unset.

Changes from v1:
* Collected the full help printing code from patman, buildman & binman into a single function so that when support for PAGER containing arguments is added it applies to all the relevant tools.

Paul Barker (2):
tools: Refactor full help printing
tools: Handle PAGER containing arguments

 tools/binman/control.py   |  9 +++------
 tools/buildman/control.py | 10 ++++------
 tools/patman/main.py      | 12 ++++--------
 tools/patman/tools.py     | 15 +++++++++++++++
 4 files changed, 26 insertions(+), 20 deletions(-)
Signature · 1 line
2.33.0