[oe-commits] Paul Eggleton : devtool: show proper error when extracting source for recipes with disabled unpack task

git at git.openembedded.org git at git.openembedded.org
Tue Sep 22 17:09:25 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: c6a9dcc143699a992b563598e1b8af8bec4996b9
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=c6a9dcc143699a992b563598e1b8af8bec4996b9

Author: Paul Eggleton <paul.eggleton at linux.intel.com>
Date:   Tue Sep 22 17:21:30 2015 +0100

devtool: show proper error when extracting source for recipes with disabled unpack task

If you try to use "devtool modify -x" or "devtool extract" on a recipe
where do_unpack has been set as noexec (e.g. glibc-locale), then we get
an error because the expected source wasn't ever unpacked. Do a check up
front for noexec being set on do_unpack and error out with a reasonable
message if that's the case.

Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 scripts/lib/devtool/standard.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 700a56b..72ec97b 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -261,6 +261,10 @@ def _extract_source(srctree, keep_temp, devbranch, d):
             raise DevtoolError("output path %s already exists and is "
                                "non-empty" % srctree)
 
+    if 'noexec' in (d.getVarFlags('do_unpack', False) or []):
+        raise DevtoolError("The %s recipe has do_unpack disabled, unable to "
+                           "extract source" % pn)
+
     # Prepare for shutil.move later on
     bb.utils.mkdirhier(srctree)
     os.rmdir(srctree)



More information about the Openembedded-commits mailing list