summaryrefslogtreecommitdiffstats
path: root/scripts/combo-layer
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2016-02-29 12:59:09 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-02 22:39:43 +0000
commit431c1e171f1d027abd977ebcba352efd2251982e (patch)
tree0063607df7911e2947d903484f6902e3ed4a8d93 /scripts/combo-layer
parent695cc45804771676af4c0b519b2f0b657533ebdc (diff)
downloadpoky-431c1e171f1d027abd977ebcba352efd2251982e.tar.gz
combo-layer: handle empty commits during "init --history"
When importing the components during the "combo-layer init" with full history and relocation into a destination directory, components with empty commits were not handled because the "mv" command was invoked with just one parameter. Replacing that with a find/xargs pair avoids the problem and should also fix the handling of filenames with special characters (in particular spaces). (From OE-Core rev: fd9d08b8ba512151615a03fda61a103760a0683c) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/combo-layer')
-rwxr-xr-xscripts/combo-layer2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/combo-layer b/scripts/combo-layer
index f028098cbb..09a53a27e4 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -380,7 +380,7 @@ tail -c +18 $tmpname | head -c -4
380 if not parent: 380 if not parent:
381 parent = '.' 381 parent = '.'
382 # May run outside of the current directory, so do not assume that .git exists. 382 # May run outside of the current directory, so do not assume that .git exists.
383 filter_branch.extend(['--tree-filter', 'mkdir -p .git/tmptree && mv $(ls -1 -a | grep -v -e ^.git$ -e ^.$ -e ^..$) .git/tmptree && mkdir -p %s && mv .git/tmptree %s' % (parent, dest_dir)]) 383 filter_branch.extend(['--tree-filter', 'mkdir -p .git/tmptree && find . -mindepth 1 -maxdepth 1 ! -name .git -print0 | xargs -0 -I SOURCE mv SOURCE .git/tmptree && mkdir -p %s && mv .git/tmptree %s' % (parent, dest_dir)])
384 filter_branch.append('HEAD') 384 filter_branch.append('HEAD')
385 runcmd(filter_branch) 385 runcmd(filter_branch)
386 runcmd('git update-ref -d refs/original/refs/heads/%s' % name) 386 runcmd('git update-ref -d refs/original/refs/heads/%s' % name)