<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">Am 01.10.2018 um 15:34 schrieb Mark Hatle &lt;<a href="mailto:mark.hatle@windriver.com" class="">mark.hatle@windriver.com</a>&gt;:</div><br class="Apple-interchange-newline"><div class=""><div class="">On 10/1/18 3:52 AM, Jens Rehsack | External Miltenyi Biotec wrote:<br class=""><blockquote type="cite" class="">Hi Mark,<br class=""><br class="">after your last update to gitsm fetcher, it seems it cannot handle submodules not using the master branch correctly:<br class=""></blockquote><br class="">I'm not sure I understand below what is going wrong.<br class=""><br class="">Does it not checkout the primary repository in the correct branch, or does this<br class="">get checked out -- and it's the submodules that get 'confused' between the<br class="">pointed to commit and the branches?<br class=""></div></div></blockquote><div><br class=""></div><div>The primary repository is - as far as I can see from the logs - checked out correctly.</div><div>It just tries to apply the branch 'master' to the submodule. The primary repository has</div><div>the branch 'develop' - what makes me a bit curios.</div><br class=""><blockquote type="cite" class=""><div class=""><div class="">The system recursively processes the git submodules, while interrogating it's<br class="">way through the system. &nbsp;If the failure is on a submode (not the main<br class="">repository) it would be something in this block...<br class=""><br class=""><a href="http://git.openembedded.org/bitbake/tree/lib/bb/fetch2/gitsm.py" class="">http://git.openembedded.org/bitbake/tree/lib/bb/fetch2/gitsm.py</a><br class=""><br class="">47 - 108<br class=""><br class="">Looking at the code, line 81.<br class=""><br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Build new SRC_URI<br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proto = uris[module].split(':', 1)[0]<br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url = uris[module].replace('%s:' % proto, 'gitsm:', 1)<br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url += ';protocol=%s' % proto<br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url += ";name=%s" % module<br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url += ";qbareclone=1;nocheckout=1"<br class=""><br class=""><br class="">It looks like a 'q' accidentally made it into the patch. &nbsp;Can you remove this<br class="">and try it? &nbsp;&nbsp;This is where the system constructs SRC_URI for the recursive<br class="">(submodule) download. &nbsp;The next block defines the SRCREV and related items and<br class="">re-calls fetch.<br class=""></div></div></blockquote><div><br class=""></div><div>Will do tomorrow when I'm back in company and report back.</div><br class=""><blockquote type="cite" class=""><div class=""><div class="">Nowhere in there do we call or set anything related to the branches. &nbsp;Maybe<br class="">"nobranch=1" needs to be added to the generated SRC_URI?<br class=""></div></div></blockquote><div><br class=""></div><div>I tried that and this ended up in wrong names for the archive files created</div><div>for the download cache (see below).</div><br class=""><blockquote type="cite" class=""><div class=""><div class="">If you can give me a recipe that used to work through 'do_unpack', then I should<br class="">be able to attempt to replicate it locally and work through the problems if the<br class="">above isn't enough of a place to look.<br class=""></div></div></blockquote><div><br class=""></div><div>Unfortunately we have only proprietary recipes using that. I can try create</div><div>one for a perl module I maintain, if you like.</div><div>You will need meta-cpan for that - can you confirm that meta-cpan works</div><div>for you in general (<a href="https://github.com/meta-cpan" class="">https://github.com/meta-cpan</a>)?</div><br class=""><blockquote type="cite" class=""><div class=""><div class="">(It also shows a missing test case, one that we need to add -- once we<br class="">understand what part and why it's failing.)<br class=""><br class="">--Mark<br class=""></div></div></blockquote><div><br class=""></div><div>Best regards,</div><div>Jens</div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><blockquote type="cite" class="">--- BEGIN INITIAL ERROR<br class="">WARNING: automacs-ui-git-r0 do_fetch: Failed to fetch URL <a href="gitsm://mgegit.miltenyibiotec.de:7999/umsa/automacs-ui.git;protocol=ssh;branch=develop;rev=fddb26a33d3f949d0863cffc5306146ab8e5a9a8" class="">gitsm://mgegit.miltenyibiotec.de:7999/umsa/automacs-ui.git;protocol=ssh;branch=develop;rev=fddb26a33d3f949d0863cffc5306146ab8e5a9a8</a>, attempting MIRRORS if available<br class="">ERROR: automacs-ui-git-r0 do_fetch: Fetcher failure for URL: '<a href="gitsm://git@mgegit.miltenyibiotec.de:7999/cpsm/cmake-modules.git;protocol=ssh;name=cmake/modules;qbareclone=1;nocheckout=1" class="">gitsm://git@mgegit.miltenyibiotec.de:7999/cpsm/cmake-modules.git;protocol=ssh;name=cmake/modules;qbareclone=1;nocheckout=1</a>'. Unable to fetch URL from any source.<br class="">ERROR: automacs-ui-git-r0 do_fetch: Fetcher failure for URL: '<a href="gitsm://mgegit.miltenyibiotec.de:7999/umsa/automacs-ui.git;protocol=ssh;branch=develop;rev=fddb26a33d3f949d0863cffc5306146ab8e5a9a8" class="">gitsm://mgegit.miltenyibiotec.de:7999/umsa/automacs-ui.git;protocol=ssh;branch=develop;rev=fddb26a33d3f949d0863cffc5306146ab8e5a9a8</a>'. Unable to fetch URL from any source.<br class="">ERROR: automacs-ui-git-r0 do_fetch: Function failed: base_do_fetch<br class="">ERROR: Logfile of failure stored in: /home/sno/gpw-community-bsp/mops-yocto-platform/tmp/work/core2-64-poky-linux/automacs-ui/git-r0/temp/log.do_fetch.5452<br class="">ERROR: Task (/home/sno/gpw-community-bsp/sources/meta-miltenyi/recipes-ui/automacs-ui/automacs-ui_git.bb:do_fetch) failed with exit code '1'<br class=""><br class="">DEBUG: Running export PSEUDO_DISABLED=1; export GIT_PROXY_COMMAND="oe-git-proxy"; export NO_PROXY="*.<a href="http://miltenyibiotec.de" class="">miltenyibiotec.de</a>,*.<a href="http://miltenyibiotec.com" class="">miltenyibiotec.com</a>"; export https_proxy="<a href="http://proxy2:8080/" class="">http://proxy2:8080/</a>"; export http_proxy="<a href="http://proxy2:8080/" class="">http://proxy2:8080/</a>"; export PATH="/home/sno/gpw-community-bsp/mops-yocto-platform/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/sno/gpw-community-bsp/sources/poky/scripts:/home/sno/gpw-community-bsp/mops-yocto-platform/tmp/work/core2-64-poky-linux/automacs-ui/git-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux:/home/sno/gpw-community-bsp/mops-yocto-platform/tmp/work/core2-64-poky-linux/automacs-ui/git-r0/recipe-sysroot/opt/miltenyi/bin/crossscripts:/home/sno/gpw-community-bsp/mops-yocto-platform/tmp/work/core2-64-poky-linux/automacs-ui/git-r0/recipe-sysroot-native/usr/sbin:/home/sno/gpw-community-bsp/mops-yocto-platform/tmp/work/core2-64-poky-linux/automacs-ui/git-r0/recipe-sysroot-native/usr/bin:/home/sno/gpw-community-bsp/mops-yocto-platform/tmp/work/core2-64-poky-linux/automacs-ui/git-r0/recipe-sysroot-native/sbin:/home/sno/gpw-community-bsp/mops-yocto-platform/tmp/work/core2-64-poky-linux/automacs-ui/git-r0/recipe-sysroot-native/bin:/home/sno/gpw-community-bsp/sources/poky/bitbake/bin:/home/sno/gpw-community-bsp/mops-yocto-platform/tmp/hosttools"; export HOME="/home/sno"; git -c core.fsyncobjectfiles=0 branch --contains c6c052603e2e3ea334c5a71e3584855c5535995f --list master 2&gt; /dev/null | wc -l<br class="">--- END INITIAL ERROR<br class=""><br class="">I cloned the appropriate project locally to see what's going on:<br class=""><br class="">sno@yoctopoc:~/prj/automacs-ui/cmake/modules$ git -c core.fsyncobjectfiles=0 branch --contains c6c052603e2e3ea334c5a71e3584855c5535995f --list<br class="">* (HEAD detached at c6c0526)<br class=""> &nbsp;develop<br class="">sno@yoctopoc:~/prj/automacs-ui/cmake/modules$ git -c core.fsyncobjectfiles=0 branch --contains c6c052603e2e3ea334c5a71e3584855c5535995f --list master<br class="">sno@yoctopoc:~/prj/automacs-ui/cmake/modules$<br class=""><br class="">The I tried to reverse engineer the gitsm fetcher and added:<br class=""><br class="">poky$ git diff<br class="">diff --git a/bitbake/lib/bb/fetch2/gitsm.py b/bitbake/lib/bb/fetch2/gitsm.py<br class="">index 51f8d0e68c..221af934c3 100644<br class="">--- a/bitbake/lib/bb/fetch2/gitsm.py<br class="">+++ b/bitbake/lib/bb/fetch2/gitsm.py<br class="">@@ -79,6 +79,7 @@ class GitSM(Git):<br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url += ';protocol=%s' % proto<br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url += ";name=%s" % module<br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url += ";qbareclone=1;nocheckout=1"<br class="">+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url += ";nobranch=1"<br class=""><br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ld = d.createCopy()<br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Not necessary to set SRC_URI, since we're passing the URI to<br class=""><br class="">which results into <br class=""><br class="">--- BEGIN FOLLOW UP ERROR<br class="">ERROR: automacs-ui-git-r0 do_unpack: Fetcher failure: Submodule cmake/modules does not exist in /home/sno/gpw-community-bsp/mops-yocto-platform/downloads/git2/<a href="http://mgegit.miltenyibiotec.de" class="">mgegit.miltenyibiotec.de</a>.7999.umsa.automacs-ui.git/modules/cmake/modules or /home/sno/gpw-community-bsp/mops-yocto-platform/tmp/work/core2-64-poky-linux/automacs-ui/git-r0/git/.git/modules/cmake/modules.<br class="">ERROR: automacs-ui-git-r0 do_unpack: Function failed: base_do_unpack<br class="">ERROR: Logfile of failure stored in: /home/sno/gpw-community-bsp/mops-yocto-platform/tmp/work/core2-64-poky-linux/automacs-ui/git-r0/temp/log.do_unpack.6551<br class="">ERROR: Task (/home/sno/gpw-community-bsp/sources/meta-miltenyi/recipes-ui/automacs-ui/automacs-ui_git.bb:do_unpack) failed with exit code '1'<br class="">--- END FOLLOW UP ERROR<br class=""><br class="">because it uses the submodule names as archive name:<br class=""><br class="">$ tar xzf downloads/<a href="http://git2_mgegit.miltenyibiotec.de" class="">git2_mgegit.miltenyibiotec.de</a>.7999.&lt;TAB&gt;<br class=""><a href="http://git2_mgegit.miltenyibiotec.de" class="">git2_mgegit.miltenyibiotec.de</a>.7999.cpsm.cmake-modules.git.tar.gz<br class=""><a href="http://git2_mgegit.miltenyibiotec.de" class="">git2_mgegit.miltenyibiotec.de</a>.7999.cpsm.mcs-lib.git.tar.gz<br class=""><a href="http://git2_mgegit.miltenyibiotec.de" class="">git2_mgegit.miltenyibiotec.de</a>.7999.umsa.corert.git.tar.gz<br class=""><a href="http://git2_mgegit.miltenyibiotec.de" class="">git2_mgegit.miltenyibiotec.de</a>.7999.umsa.protos.git.tar.gz<br class=""><br class="">Cheers,<br class="">Jens<br class=""><br class=""></blockquote><br class=""></div></div></blockquote></div><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">--&nbsp;</div><div class="">Jens Rehsack - <a href="mailto:rehsack@gmail.com" class="">rehsack@gmail.com</a></div></div></div>
</div>
<br class=""></body></html>