]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa/selftest/devtool: Correct git clone of local repository
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Wed, 6 Dec 2023 20:55:23 +0000 (21:55 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 8 Dec 2023 16:58:28 +0000 (16:58 +0000)
If the build environment is setup using `repo`, then poky/.git/object
is a symbolic link rather than a directory. To clone such repositories,
the source path must be prefixed with "file://". This avoids the
following error:

  fatal: failed to start iterator over '.../poky/.git/objects': Not a directory

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/devtool.py

index 21e22686899e3f186fd32734a8bf57e6012748a8..14a9d2f923d3634f51af7f7bce3511e207ed7a62 100644 (file)
@@ -54,7 +54,7 @@ def setUpModule():
             result = runCmd('git rev-parse --show-toplevel', cwd=canonical_layerpath)
             oldreporoot = result.output.rstrip()
             newmetapath = os.path.join(corecopydir, os.path.relpath(oldmetapath, oldreporoot))
-            runCmd('git clone %s %s' % (oldreporoot, corecopydir), cwd=templayerdir)
+            runCmd('git clone file://%s %s' % (oldreporoot, corecopydir), cwd=templayerdir)
             # Now we need to copy any modified files
             # You might ask "why not just copy the entire tree instead of
             # cloning and doing this?" - well, the problem with that is