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-06-28 09:41:59 +0100 |
| commit | d8f151b6a385f81abead65624ba15d42cbd90e11 (patch) | |
| tree | 81ba1b3a97211c81b48c6c4a9abd80ce4d568c1d /scripts/lib/devtool | |
| parent | 3378c932570ba2301cd02103225fcf7629de656f (diff) | |
| download | openembedded-core-d8f151b6a385f81abead65624ba15d42cbd90e11.tar.gz openembedded-core-d8f151b6a385f81abead65624ba15d42cbd90e11.tar.bz2 openembedded-core-d8f151b6a385f81abead65624ba15d42cbd90e11.zip | |
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 master 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/devtool')
| -rw-r--r-- | scripts/lib/devtool/standard.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 6b5378176e..4dc175d117 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py @@ -23,6 +23,7 @@ import glob import tempfile import logging import argparse +import scriptutils from devtool import exec_build_env_command, setup_tinfoil logger = logging.getLogger('devtool') @@ -236,12 +237,7 @@ def _extract_source(srctree, keep_temp, devbranch, d): # Handle if S is set to a subdirectory of the source srcsubdir = os.path.join(workdir, os.path.relpath(srcsubdir, workdir).split(os.sep)[0]) - if os.path.exists(os.path.join(srcsubdir, '.git')): - alternatesfile = os.path.join(srcsubdir, '.git', 'objects', 'info', 'alternates') - if os.path.exists(alternatesfile): - # This will have been cloned with -s, so we need to convert it to a full clone - bb.process.run('git repack -a', cwd=srcsubdir) - os.remove(alternatesfile) + scriptutils.git_convert_standalone_clone(srcsubdir) patchdir = os.path.join(srcsubdir, 'patches') haspatches = False |
