[oe-commits] [openembedded-core] 63/65: externalsrc: Use git add -A for compatibility with all git versions

git at git.openembedded.org git at git.openembedded.org
Wed Mar 22 10:14:37 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 964e8b8cae4b28e21ade12b5effb494e459b1f0f
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Tue Mar 21 19:28:42 2017 +0000

    externalsrc: Use git add -A for compatibility with all git versions
    
    I've been debugging a selftest failure on Centos7. The problem turns out
    to be the elderly git version (1.8.3.1) on those systems. It means that
    the system doesn't correctly checksum changed files in the source tree,
    which in turn means do_compile fails to run and this leads to the following
    selftest failure:
    
    ======================================================================
    FAIL [141.373s]: test_devtool_buildclean (oeqa.selftest.devtool.DevtoolTests)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/devtool.py", line 530, in test_devtool_buildclean
        assertFile(tempdir_mdadm, 'mdadm')
      File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/devtool.py", line 497, in assertFile
        self.assertTrue(os.path.exists(f), "%r does not exist" % f)
    AssertionError: False is not true : '/tmp/devtoolqag88s39z8/mdadm' does not exist
    
    The solution is to use -A on the git add commandline which matches the behaviour
    in git 2.0+ versions and resolves the problem.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/externalsrc.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index 39789ea..d64af6a 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -190,7 +190,7 @@ def srctree_hash_files(d, srcdir=None):
             # Update our custom index
             env = os.environ.copy()
             env['GIT_INDEX_FILE'] = tmp_index.name
-            subprocess.check_output(['git', 'add', '.'], cwd=s_dir, env=env)
+            subprocess.check_output(['git', 'add', '-A', '.'], cwd=s_dir, env=env)
             sha1 = subprocess.check_output(['git', 'write-tree'], cwd=s_dir, env=env).decode("utf-8")
         with open(oe_hash_file, 'w') as fobj:
             fobj.write(sha1)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list