]> code.ossystems Code Review - openembedded-core.git/commitdiff
recipetool: create: fix error when extracting source to a specified directory
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 22 Dec 2015 04:03:17 +0000 (17:03 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 15 Jan 2016 15:41:31 +0000 (15:41 +0000)
Having fetched the source and unpacked it to a temporary directory, we
then move part of it to the destination directory, or if the source is at
the top level we move the whole temporary directory, but in the latter
case we were later attempting to delete the temporary directory which no
longer existed. Clear out the variable so that doesn't happen.

(From OE-Core master rev: 91714a52e91cddba5a16c73cf5765d1f47f7856c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/recipetool/create.py

index bf4277ced35807246ac54f3f8a4197388c14a22b..8305e436487fe238a841e12b3c56168097035e8f 100644 (file)
@@ -283,6 +283,8 @@ def create_recipe(args):
             # to just remove it first
             os.rmdir(args.extract_to)
         shutil.move(srctree, args.extract_to)
+        if tempsrc == srctree:
+            tempsrc = None
         logger.info('Source extracted to %s' % args.extract_to)
 
     if outfile == '-':