diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-04-28 12:25:30 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-01 17:08:50 +0100 |
commit | a4fca1d52386924f25a18f6c4ed94e1a7bbac8e4 (patch) | |
tree | b75810ef1f906d0fcba0e9c71a6c9d66a5927e75 /scripts/lib/recipetool/create.py | |
parent | 24e5ad268ceb3272a370f67ac3ee02f38f92f2ee (diff) | |
download | poky-a4fca1d52386924f25a18f6c4ed94e1a7bbac8e4.tar.gz |
recipetool: ensure git clone is standalone when extracting
If -x is specified and the specified URI was a git repository, we need
to ensure that the resulting clone is a sandalone and not one that has
pointers into the temporary fetch location or DL_DIR (since the git
fetcher does a local clone with -s). Split out the code from devtool
that already does this for "devtool modify -x" and reuse that.
(From OE-Core rev: fc47e8652ef32e7399f57c80593df90dc52d8b84)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/recipetool/create.py')
-rw-r--r-- | scripts/lib/recipetool/create.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index 1d5bfd995c..0c413688c0 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py | |||
@@ -22,6 +22,7 @@ import glob | |||
22 | import fnmatch | 22 | import fnmatch |
23 | import re | 23 | import re |
24 | import logging | 24 | import logging |
25 | import scriptutils | ||
25 | 26 | ||
26 | logger = logging.getLogger('recipetool') | 27 | logger = logging.getLogger('recipetool') |
27 | 28 | ||
@@ -238,6 +239,7 @@ def create_recipe(args): | |||
238 | outlines.extend(lines_after) | 239 | outlines.extend(lines_after) |
239 | 240 | ||
240 | if args.extract_to: | 241 | if args.extract_to: |
242 | scriptutils.git_convert_standalone_clone(srctree) | ||
241 | shutil.move(srctree, args.extract_to) | 243 | shutil.move(srctree, args.extract_to) |
242 | logger.info('Source extracted to %s' % args.extract_to) | 244 | logger.info('Source extracted to %s' % args.extract_to) |
243 | 245 | ||