From: Peter Kjellerstedt Date: Wed, 6 Dec 2023 20:55:23 +0000 (+0100) Subject: oeqa/selftest/devtool: Correct git clone of local repository X-Git-Tag: yocto-5.2~4363 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8e3d08cb9274832a346ac3dffa8c9d5f6e93c478;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git oeqa/selftest/devtool: Correct git clone of local repository 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 Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index 21e22686899..14a9d2f923d 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -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