Skip to content

execute patch commands without an implicit shell

Anders Heimer openembedded-core 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest9 patches 0 repliesNew
  2. v19 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- Accept both valid Git %aI representations of UTC, Z and +00:00, in the fallback metadata test

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9oe/patch: drop shell=True from runcmdmeta/lib/oe/patch.py+9 -50 replies
2/9oeqa/oelib: add runcmd testsmeta/lib/oeqa/selftest/cases/oelib/patch.py+45 -00 replies
3/9oe/patch: convert simple runcmd shell callersmeta/lib/oe/patch.py+22 -200 replies
4/9oe/patch: avoid shell pipeline in _applypatchmeta/lib/oe/patch.py+7 -70 replies
5/9oe/patch: remove obsolete PATCHFILE assignmentmeta/lib/oe/patch.py+4 -60 replies
6/9oeqa/oelib: test GitApplyTree patch namesmeta/lib/oeqa/selftest/cases/oelib/patch.py+136 -00 replies
7/9oe/patch: pass GitApplyTree commands as argv listsmeta/lib/oe/patch.py scripts/lib/devtool/upgrade.py+29 -230 replies
8/9oe/patch: return manual-resolution commands as argv listsmeta/lib/oe/patch.py+5 -20 replies
9/9oeqa/oelib: test patch command argv handlingmeta/lib/oeqa/selftest/cases/oelib/patch.py+101 -00 replies

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by.

PatchDaniel Turull
1/9R-b
2/9R-b
3/9R-b
4/9R-b
5/9R-b
6/9R-b
7/9R-b
8/9R-b
9/9R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/9] execute patch commands without an implicit shell

Continue the shell=True cleanup in oe.patch.

Run runcmd() argument lists directly instead of joining them into an implicit shell command string.

This series converts the non test runcmd() callers that invoked it with -sh.

The series also replaces the cat-to-patch pipeline with patch -i, removes the obsolete PATCHFILE assignment, converts GitApplyTree commands to argv lists, and keeps manual-resolution commands as argv lists.

oelib tests cover argv handling and error reporting, GitApplyTree patch-name preservation, fallback commit metadata, and run=False command generation without repository side effects.

Changes in v2:
- Accept both valid Git %aI representations of UTC, Z and +00:00, in the fallback metadata test

Anders Heimer (9):
oe/patch: drop shell=True from runcmd oeqa/oelib: add runcmd tests
oe/patch: convert simple runcmd shell callers oe/patch: avoid shell pipeline in _applypatch oe/patch: remove obsolete PATCHFILE assignment oeqa/oelib: test GitApplyTree patch names oe/patch: pass GitApplyTree commands as argv lists oe/patch: return manual-resolution commands as argv lists oeqa/oelib: test patch command argv handling

 meta/lib/oe/patch.py                        | 131 +++++----
 meta/lib/oeqa/selftest/cases/oelib/patch.py | 282 ++++++++++++++++++++
 scripts/lib/devtool/upgrade.py              |   2 +-
 3 files changed, 355 insertions(+), 60 deletions(-)
 create mode 100644 meta/lib/oeqa/selftest/cases/oelib/patch.py