]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
devtool/upgrade: raise an error if extracting source produces more than one directory
authorAlexander Kanavin <alex.kanavin@gmail.com>
Wed, 2 Aug 2023 07:24:35 +0000 (09:24 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 4 Aug 2023 10:44:24 +0000 (11:44 +0100)
commitb25e922b271794906b22450c7e6cc18fcab51ff8
tree4b71a391e14354c454cbf3dcea2ef8abdac4e496
parentb2cc6f150d68ffcdb7e767b94731bc2ff258e4de
devtool/upgrade: raise an error if extracting source produces more than one directory

This can happen if running unpack task produces unrelated files and directories
(e.g. if recipe_qa or other tasks run); in this case it's better to stop, rather
than allow devtool to continue and error out much later with a message that has
nothing to do with where the problem originated.

The idea here was to handle tarballs that don't contain a top level directory and thus
the source tree is one level up; this basically never happens, and if it does we
should find a less brittle way to handle such tarballs.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/devtool/upgrade.py