]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
devtool: finish/update-recipe: restrict mode srcrev to recipes fetched from SCM
authorJulien Stephan <jstephan@baylibre.com>
Wed, 22 Nov 2023 11:08:14 +0000 (12:08 +0100)
committerSteve Sakoman <steve@sakoman.com>
Thu, 28 Dec 2023 14:43:58 +0000 (04:43 -1000)
commit9254b08fbfba3734d5bc717a382d909595833db1
tree320e4941280f5f07d24f15dc01ff549208b19fc7
parent11eab2b5d14efa75fcb0686a9f835f9675883113
devtool: finish/update-recipe: restrict mode srcrev to recipes fetched from SCM

When specifying --mode / -m srcrev with devtool finish/update-recipe on
recipes that are not fetched from a SCM repository we get the following
error:

  Traceback (most recent call last):
  [..]
    File "<...>/poky/meta/lib/oe/patch.py", line 49, in runcmd
    raise CmdError(cmd, exitstatus >> 8, "stdout: %s\nstderr: %s" % (stdout, stderr))
oe.patch.CmdError: Command Error: 'sh -c 'git format-patch --no-signature --no-numbered INVALID -o /tmp/oepatchbj7pfmzj -- .'' exited with 0  Output:
stdout:
stderr: fatal: bad revision 'INVALID'

Fix this by adding a check and abort with a proper error message.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 5b77f60e85d07921ae5e808daa1fd7d8c3dc40ea)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
scripts/lib/devtool/standard.py