[oe-commits] [bitbake] 02/02: fetch2/gitsm: copy submodules from DL_DIR in unpack

git at git.openembedded.org git at git.openembedded.org
Wed Aug 23 12:50:14 UTC 2017


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

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

commit 3a42078b4792073416bdd9ab90dceff3b2ba7f55
Author: Christopher Larson <chris_larson at mentor.com>
AuthorDate: Mon Aug 21 21:57:08 2017 +0500

    fetch2/gitsm: copy submodules from DL_DIR in unpack
    
    Revert "fetch2/gitsm: Fix when repository change submodules"
    
    This reverts commit 12f6c0651af8bd5d6efb751690571cf2fcd3eeb0.
    
    This commit caused the gitsm fetcher to download submodules from upstream in
    do_unpack, rather than using the previously fetched submodules from DL_DIR.
    Also drop the pointless checkout, as Git.unpack() already handles this
    correctly.
    
    [YOCTO #11830]
    
    Signed-off-by: Christopher Larson <chris_larson at mentor.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/fetch2/gitsm.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/bb/fetch2/gitsm.py b/lib/bb/fetch2/gitsm.py
index 0aff100..ed94c3d 100644
--- a/lib/bb/fetch2/gitsm.py
+++ b/lib/bb/fetch2/gitsm.py
@@ -131,5 +131,6 @@ class GitSM(Git):
         Git.unpack(self, ud, destdir, d)
 
         if self.uses_submodules(ud, d, ud.destdir):
-            runfetchcmd(ud.basecmd + " checkout " + ud.revisions[ud.names[0]], d, workdir=ud.destdir)
+            if not ud.shallow or ud.localpath != ud.fullshallow:
+                runfetchcmd('cp -fpPRH "%s/modules" "%s/"' % (ud.clonedir, os.path.join(ud.destdir, '.git')), d)
             runfetchcmd(ud.basecmd + " submodule update --init --recursive", d, workdir=ud.destdir)

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


More information about the Openembedded-commits mailing list