Skip to contentSkip to conversation

fetch/gitsm: avoid live submodule fetching during unpack()

PATCH Superseded Matt Hoosier 2 participants 6 messages May 14, 2018 – May 25, 2018

v4 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 fetch/gitsm: avoid live submodule fetching during unpack()

Although the submodules' histories have been fetched during the do_fetch() phase, the mechanics used to clone the workdir copy of the repo haven't been transferring the actual .git/modules directory from the repo fetched into downloads/ during the fetch task.

Fix that, and for good measure also explicitly tell Git to avoid hitting the network during do_unpack() of the submodules.

[YOCTO #12739]

---
 lib/bb/fetch2/gitsm.py | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)
lib/bb/fetch2/gitsm.py +27 -1
index 0aff1008..c5019e98 100644
@@ -132,4 +132,30 @@ class GitSM(Git):
 
         if self.uses_submodules(ud, d, ud.destdir):
             runfetchcmd(ud.basecmd + " checkout " + ud.revisions[ud.names[0]], d, workdir=ud.destdir)
-            runfetchcmd(ud.basecmd + " submodule update --init --recursive", d, workdir=ud.destdir)
+
+            updateflags = ""
+
+            # Copy over the submodules' fetched histories too.
+            if ud.bareclone:
+                repo_conf = ud.destdir
+            else:
+                repo_conf = os.path.join(ud.destdir, '.git')
+
+            if os.path.exists(ud.clonedir):
+                # This is not a copy unpacked from a shallow mirror clone. So
+                # the manual intervention to populate the .git/modules done
+                # in clone_shallow_local() won't have been done yet.
+                runfetchcmd("cp -fpPRH %s %s" % (os.path.join(ud.clonedir, 'modules'), repo_conf), d)
+                updateflags += " --no-fetch"
+            elif os.path.exists(os.path.join(repo_conf, 'modules')):
+                # Unpacked from a shallow mirror clone. Manual population of
+                # .git/modules is already done.
+                updateflags += " --no-fetch"
+            else:
+                # This isn't fatal; git-submodule will just fetch it
+                # during do_unpack().
+                bb.error("submodule history not retrieved during do_fetch()")
+
+            # Careful not to hit the network during unpacking; all history should already
+            # be fetched.
+            runfetchcmd(ud.basecmd + " submodule update --init --recursive %s" % updateflags, d, workdir=ud.destdir)
Signature · 1 line
2.13.6
#1 lore raw

Sorry, but:

2018-05-14 18:57:44,968 - oe-selftest - INFO - FAIL:
test_devtool_add_fetch_git (devtool.DevtoolTests)
2018-05-14 18:57:44,968 - oe-selftest - INFO -
----------------------------------------------------------------------
2018-05-14 18:57:44,968 - oe-selftest - INFO - Traceback (most recent

call last):
File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/core/decorator/__init__.py",
line 32, in wrapped_f
return func(*args, **kwargs)
File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/cases/devtool.py",
line 403, in test_devtool_add_fetch_git

    result = runCmd('devtool add %s %s -f "%s" -V 1.5' % (testrecipe,

srcdir, url_rev))
File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/utils/commands.py",
line 191, in runCmd
raise AssertionError("Command '%s' returned non-zero exit status
%d:\n%s" % (command, result.status, exc_output))
AssertionError: Command 'devtool add mraa /tmp/devtoolqa0aghorcw/mraa
-f "gitsm://git.yoctoproject.org/mraa;rev=ae127b19a50aa54255e4330ccfdd9a5d058e581d"
-V 1.5' returned non-zero exit status 1:
...

ERROR: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export PATH="/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/scripts:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/recipetool-utucnynk/work/recipe-sysroot-native/usr/bin/x86_64-poky-linux:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/recipetool-utucnynk/work/recipe-sysroot/usr/bin/crossscripts:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/recipetool-utucnynk/work/recipe-sysroot-native/usr/sbin:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/recipetool-utucnynk/work/recipe-sysroot-native/usr/bin:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/recipetool-utucnynk/work/recipe-sysroot-native/sbin:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/recipetool-utucnynk/work/recipe-sysroot-native/bin:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/bitbake/bin:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/hosttools"; export HOME="/home/pokybuild"; git -c core.fsyncobjectfiles=0
submodule update --init --recursive --no-fetch failed with exit code
1, output:
Submodule 'doxygen2jsdoc'
(https://github.com/arfoll/doxygen2jsdoc.git) registered for path
'doxygen2jsdoc'
fatal: reference is not a tree: 9cc90b7976252b2d14b7956230c5870097e1f008
Unable to checkout '9cc90b7976252b2d14b7956230c5870097e1f008' in
submodule path 'doxygen2jsdoc'

Ross

Quoted 60 lines · Matt Hoosier

Although the submodules' histories have been fetched during the do_fetch() phase, the mechanics used to clone the workdir copy of the repo haven't been transferring the actual .git/modules directory from the repo fetched into downloads/ during the fetch task.

Fix that, and for good measure also explicitly tell Git to avoid hitting the network during do_unpack() of the submodules.

[YOCTO #12739]

---
 lib/bb/fetch2/gitsm.py | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)
lib/bb/fetch2/gitsm.py +27 -2
index 0aff1008..c5019e98 100644
@@ -132,4 +132,30 @@ class GitSM(Git):
 
         if self.uses_submodules(ud, d, ud.destdir):
             runfetchcmd(ud.basecmd + " checkout " + ud.revisions[ud.names[0]], d, workdir=ud.destdir)
-            runfetchcmd(ud.basecmd + " submodule update --init --recursive", d, workdir=ud.destdir)
+
+            updateflags = ""
+
+            # Copy over the submodules' fetched histories too.
+            if ud.bareclone:
+                repo_conf = ud.destdir
+            else:
+                repo_conf = os.path.join(ud.destdir, '.git')
+
+            if os.path.exists(ud.clonedir):
+                # This is not a copy unpacked from a shallow mirror clone. So
+                # the manual intervention to populate the .git/modules done
+                # in clone_shallow_local() won't have been done yet.
+                runfetchcmd("cp -fpPRH %s %s" % (os.path.join(ud.clonedir, 'modules'), repo_conf), d)
+                updateflags += " --no-fetch"
+            elif os.path.exists(os.path.join(repo_conf, 'modules')):
+                # Unpacked from a shallow mirror clone. Manual population of
+                # .git/modules is already done.
+                updateflags += " --no-fetch"
+            else:
+                # This isn't fatal; git-submodule will just fetch it
+                # during do_unpack().
+                bb.error("submodule history not retrieved during do_fetch()")
+
+            # Careful not to hit the network during unpacking; all history should already
+            # be fetched.
+            runfetchcmd(ud.basecmd + " submodule update --init --recursive %s" % updateflags, d, workdir=ud.destdir)
--

2.13.6

--
_______________________________________________
bitbake-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/bitbake-devel

#2 lore raw
Quoted 98 lines · Ross

Sorry, but:

2018-05-14 18:57:44,968 - oe-selftest - INFO - FAIL:
test_devtool_add_fetch_git (devtool.DevtoolTests)
2018-05-14 18:57:44,968 - oe-selftest - INFO -
----------------------------------------------------------------------
2018-05-14 18:57:44,968 - oe-selftest - INFO - Traceback (most recent

call last):
File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/core/decorator/__init__.py", line 32, in wrapped_f
return func(*args, **kwargs)
File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/cases/devtool.py", line 403, in test_devtool_add_fetch_git

    result = runCmd('devtool add %s %s -f "%s" -V 1.5' % (testrecipe,

srcdir, url_rev))
File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/utils/commands.py", line 191, in runCmd
raise AssertionError("Command '%s' returned non-zero exit status
%d:\n%s" % (command, result.status, exc_output))
AssertionError: Command 'devtool add mraa /tmp/devtoolqa0aghorcw/mraa
-f "gitsm://
git.yoctoproject.org/mraa;rev=ae127b19a50aa54255e4330ccfdd9a5d058e581d"
-V 1.5' returned non-zero exit status 1:
...

ERROR: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export

PATH="/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/scripts:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/recipetool-utucnynk/work/recipe-sysroot-native/usr/bin/x86_64-poky-linux:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/recipetool-utucnynk/work/recipe-sysroot/usr/bin/crossscripts:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/recipetool-utucnynk/work/recipe-sysroot-native/usr/sbin:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/recipetool-utucnynk/work/recipe-sysroot-native/usr/bin:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/recipetool-utucnynk/work/recipe-sysroot-native/sbin:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/recipetool-utucnynk/work/recipe-sysroot-native/bin:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/bitbake/bin:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/hosttools"; export HOME="/home/pokybuild"; git -c core.fsyncobjectfiles=0
submodule update --init --recursive --no-fetch failed with exit code
1, output:
Submodule 'doxygen2jsdoc'
(https://github.com/arfoll/doxygen2jsdoc.git) registered for path
'doxygen2jsdoc'
fatal: reference is not a tree: 9cc90b7976252b2d14b7956230c5870097e1f008
Unable to checkout '9cc90b7976252b2d14b7956230c5870097e1f008' in
submodule path 'doxygen2jsdoc'

Ross

Quoted 21 lines · Matt Hoosier

Although the submodules' histories have been fetched during the do_fetch() phase, the mechanics used to clone the workdir copy of the repo haven't been transferring the actual .git/modules directory from the repo fetched into downloads/ during the fetch task.

Fix that, and for good measure also explicitly tell Git to avoid hitting the network during do_unpack() of the submodules.

[YOCTO #12739]

---
 lib/bb/fetch2/gitsm.py | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)
lib/bb/fetch2/gitsm.py +0 -0
index 0aff1008..c5019e98 100644

lib/bb/fetch2/gitsm.py class GitSM(Git): · line 134

Quoted 3 lines
lib/bb/fetch2/gitsm.py +0 -0
@@ -132,4 +132,30 @@ class GitSM(Git):
 
         if self.uses_submodules(ud, d, ud.destdir):
             runfetchcmd(ud.basecmd + " checkout " +

ud.revisions[ud.names[0]], d, workdir=ud.destdir)

lib/bb/fetch2/gitsm.py class GitSM(Git): · line 135

Quoted 1 line
lib/bb/fetch2/gitsm.py +0 -1
-            runfetchcmd(ud.basecmd + " submodule update --init

--recursive", d, workdir=ud.destdir)

lib/bb/fetch2/gitsm.py class GitSM(Git):

Quoted 11 lines
lib/bb/fetch2/gitsm.py +11 -0
+
+            updateflags = ""
+
+            # Copy over the submodules' fetched histories too.
+            if ud.bareclone:
+                repo_conf = ud.destdir
+            else:
+                repo_conf = os.path.join(ud.destdir, '.git')
+
+            if os.path.exists(ud.clonedir):
+                # This is not a copy unpacked from a shallow mirror

clone. So

lib/bb/fetch2/gitsm.py class GitSM(Git): · line 146

Quoted 1 line
lib/bb/fetch2/gitsm.py +1 -0
+                # the manual intervention to populate the .git/modules

done

lib/bb/fetch2/gitsm.py class GitSM(Git): · line 148

Quoted 2 lines
lib/bb/fetch2/gitsm.py +2 -0
+                # in clone_shallow_local() won't have been done yet.
+                runfetchcmd("cp -fpPRH %s %s" %

(os.path.join(ud.clonedir, 'modules'), repo_conf), d)

lib/bb/fetch2/gitsm.py class GitSM(Git):

Quoted 3 lines
lib/bb/fetch2/gitsm.py +3 -0
+                updateflags += " --no-fetch"
+            elif os.path.exists(os.path.join(repo_conf, 'modules')):
+                # Unpacked from a shallow mirror clone. Manual

population of

lib/bb/fetch2/gitsm.py class GitSM(Git):

Quoted 6 lines
lib/bb/fetch2/gitsm.py +6 -0
+                # .git/modules is already done.
+                updateflags += " --no-fetch"
+            else:
+                # This isn't fatal; git-submodule will just fetch it
+                # during do_unpack().
+                bb.error("submodule history not retrieved during
Quoted 15 lines

do_fetch()")

lib/bb/fetch2/gitsm.py class GitSM(Git): · line 159

Quoted 2 lines
lib/bb/fetch2/gitsm.py +2 -0
+
+            # Careful not to hit the network during unpacking; all

history should already

lib/bb/fetch2/gitsm.py class GitSM(Git): · line 161

Quoted 2 lines
lib/bb/fetch2/gitsm.py +2 -0
+            # be fetched.
+            runfetchcmd(ud.basecmd + " submodule update --init

--recursive %s" % updateflags, d, workdir=ud.destdir)

Quoted 8 lines

--
2.13.6

--
_______________________________________________
bitbake-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/bitbake-devel

Okay, I'll have a look at that. Are there any other test suites I should know about?

Quoted 2 lines
#3 lore raw

Hi Matt,

If you run oe-selftest -r devtool then it will run the tests which are failing.

Ross

Quoted 122 lines · Matt Hoosier
Quoted 109 lines · Ross

Sorry, but:

2018-05-14 18:57:44,968 - oe-selftest - INFO - FAIL:
test_devtool_add_fetch_git (devtool.DevtoolTests)
2018-05-14 18:57:44,968 - oe-selftest - INFO -
----------------------------------------------------------------------
2018-05-14 18:57:44,968 - oe-selftest - INFO - Traceback (most recent

call last):
File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/core/decorator/__init__.py", line 32, in wrapped_f
return func(*args, **kwargs)
File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/cases/devtool.py", line 403, in test_devtool_add_fetch_git

    result = runCmd('devtool add %s %s -f "%s" -V 1.5' % (testrecipe,

srcdir, url_rev))
File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/utils/commands.py", line 191, in runCmd
raise AssertionError("Command '%s' returned non-zero exit status
%d:\n%s" % (command, result.status, exc_output))
AssertionError: Command 'devtool add mraa /tmp/devtoolqa0aghorcw/mraa
-f
"gitsm://git.yoctoproject.org/mraa;rev=ae127b19a50aa54255e4330ccfdd9a5d058e581d"
-V 1.5' returned non-zero exit status 1:
...

ERROR: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export

PATH="/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/scripts:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/recipetool-utucnynk/work/recipe-sysroot-native/usr/bin/x86_64-poky-linux:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/recipetool-utucnynk/work/recipe-sysroot/usr/bin/crossscripts:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/recipetool-utucnynk/work/recipe-sysroot-native/usr/sbin:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/recipetool-utucnynk/work/recipe-sysroot-native/usr/bin:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/recipetool-utucnynk/work/recipe-sysroot-native/sbin:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/recipetool-utucnynk/work/recipe-sysroot-native/bin:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/bitbake/bin:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/hosttools"; export HOME="/home/pokybuild"; git -c core.fsyncobjectfiles=0
submodule update --init --recursive --no-fetch failed with exit code
1, output:
Submodule 'doxygen2jsdoc'
(https://github.com/arfoll/doxygen2jsdoc.git) registered for path
'doxygen2jsdoc'
fatal: reference is not a tree: 9cc90b7976252b2d14b7956230c5870097e1f008
Unable to checkout '9cc90b7976252b2d14b7956230c5870097e1f008' in
submodule path 'doxygen2jsdoc'

Ross

Quoted 64 lines · Matt Hoosier

Although the submodules' histories have been fetched during the do_fetch() phase, the mechanics used to clone the workdir copy of the repo haven't been transferring the actual .git/modules directory from the repo fetched into downloads/ during the fetch task.

Fix that, and for good measure also explicitly tell Git to avoid hitting the network during do_unpack() of the submodules.

[YOCTO #12739]

---
 lib/bb/fetch2/gitsm.py | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)
lib/bb/fetch2/gitsm.py +11 -2
index 0aff1008..c5019e98 100644
@@ -132,4 +132,30 @@ class GitSM(Git):
 
         if self.uses_submodules(ud, d, ud.destdir):
             runfetchcmd(ud.basecmd + " checkout " +
 ud.revisions[ud.names[0]], d, workdir=ud.destdir)
-            runfetchcmd(ud.basecmd + " submodule update --init
--recursive", d, workdir=ud.destdir)
+
+            updateflags = ""
+
+            # Copy over the submodules' fetched histories too.
+            if ud.bareclone:
+                repo_conf = ud.destdir
+            else:
+                repo_conf = os.path.join(ud.destdir, '.git')
+
+            if os.path.exists(ud.clonedir):
+                # This is not a copy unpacked from a shallow mirror

clone. So
+ # the manual intervention to populate the .git/modules
done

lib/bb/fetch2/gitsm.py +2 -0
+                # in clone_shallow_local() won't have been done yet.
+                runfetchcmd("cp -fpPRH %s %s" %

(os.path.join(ud.clonedir, 'modules'), repo_conf), d)

lib/bb/fetch2/gitsm.py +3 -0
+                updateflags += " --no-fetch"
+            elif os.path.exists(os.path.join(repo_conf, 'modules')):
+                # Unpacked from a shallow mirror clone. Manual

population of

lib/bb/fetch2/gitsm.py +6 -0
+                # .git/modules is already done.
+                updateflags += " --no-fetch"
+            else:
+                # This isn't fatal; git-submodule will just fetch it
+                # during do_unpack().
+                bb.error("submodule history not retrieved during

do_fetch()")

lib/bb/fetch2/gitsm.py +2 -0
+
+            # Careful not to hit the network during unpacking; all

history should already

lib/bb/fetch2/gitsm.py +2 -2
+            # be fetched.
+            runfetchcmd(ud.basecmd + " submodule update --init
--recursive %s" % updateflags, d, workdir=ud.destdir)
--

2.13.6

Quoted 5 lines
Quoted 5 lines

--
_______________________________________________
bitbake-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/bitbake-devel

Okay, I'll have a look at that. Are there any other test suites I should know about?

Quoted 2 lines
#4 lore raw

Right; I got enough context from your copied/pasted failure report to duplicate it. I'm just wondering if there are other test batteries besides bitbake-selftest and oe-selftest that are gates to clear?

-Matt

Quoted 159 lines · Ross

Hi Matt,

If you run oe-selftest -r devtool then it will run the tests which are failing.

Ross

Quoted 4 lines · Matt Hoosier
Quoted 3 lines · Ross

Sorry, but:

Quoted 8 lines
Quoted 8 lines
2018-05-14 18:57:44,968 - oe-selftest - INFO - FAIL:
test_devtool_add_fetch_git (devtool.DevtoolTests)
2018-05-14 18:57:44,968 - oe-selftest - INFO -
----------------------------------------------------------------------
2018-05-14 18:57:44,968 - oe-selftest - INFO - Traceback (most recent

call last):
File
"/home/pokybuild/yocto-autobuilder/yocto-worker/

nightly-oe-selftest/build/meta/lib/oeqa/core/decorator/__init__.py",

Quoted 4 lines
Quoted 4 lines

line 32, in wrapped_f
return func(*args, **kwargs)
File
"/home/pokybuild/yocto-autobuilder/yocto-worker/

nightly-oe-selftest/build/meta/lib/oeqa/selftest/cases/devtool.py",

Quoted 5 lines
Quoted 5 lines

line 403, in test_devtool_add_fetch_git

    result = runCmd('devtool add %s %s -f "%s" -V 1.5' % (testrecipe,

srcdir, url_rev))
File
"/home/pokybuild/yocto-autobuilder/yocto-worker/

nightly-oe-selftest/build/meta/lib/oeqa/utils/commands.py",

Quoted 6 lines
Quoted 6 lines

line 191, in runCmd
raise AssertionError("Command '%s' returned non-zero exit status
%d:\n%s" % (command, result.status, exc_output))
AssertionError: Command 'devtool add mraa /tmp/devtoolqa0aghorcw/mraa -f "gitsm://git.yoctoproject.org/mraa;rev=ae127b19a50aa54255e4330ccfdd9a

5d058e581d"

Quoted 6 lines
Quoted 6 lines

-V 1.5' returned non-zero exit status 1:
...

ERROR: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export

PATH="/home/pokybuild/yocto-autobuilder/yocto-worker/

nightly-oe-selftest/build/build/tmp/sysroots-uninative/ x86_64-linux/usr/bin:/home/pokybuild/yocto-autobuilder/ yocto-worker/nightly-oe-selftest/build/scripts:/home/ pokybuild/yocto-autobuilder/yocto-worker/nightly-oe- selftest/build/build/tmp/work/recipetool-utucnynk/work/ recipe-sysroot-native/usr/bin/x86_64-poky-linux:/home/ pokybuild/yocto-autobuilder/yocto-worker/nightly-oe- selftest/build/build/tmp/work/recipetool-utucnynk/work/ recipe-sysroot/usr/bin/crossscripts:/home/pokybuild/ yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/ recipetool-utucnynk/work/recipe-sysroot-native/usr/ sbin:/home/pokybuild/yocto-autobuilder/yocto-worker/ nightly-oe-selftest/build/build/tmp/work/recipetool- utucnynk/work/recipe-sysroot-native/usr/bin:/home/ pokybuild/yocto-autobuilder/yocto-worker/nightly-oe- selftest/build/build/tmp/work/recipetool-utucnynk/work/ recipe-sysroot-native/sbin:/home/pokybuild/yocto-autobuilder/yocto-worker/ nightly-oe-selftest/build/build/tmp/work/recipetool- utucnynk/work/recipe-sysroot-native/bin:/home/pokybuild/ yocto-autobuilder/yocto-worker/nightly-oe-selftest/ build/bitbake/bin:/home/pokybuild/yocto-autobuilder/ yocto-worker/nightly-oe-selftest/build/build/tmp/hosttools";

Quoted 7 lines
Quoted 7 lines

export HOME="/home/pokybuild"; git -c core.fsyncobjectfiles=0 submodule update --init --recursive --no-fetch failed with exit code 1, output:
Submodule 'doxygen2jsdoc'
(https://github.com/arfoll/doxygen2jsdoc.git) registered for path 'doxygen2jsdoc'
fatal: reference is not a tree: 9cc90b7976252b2d14b7956230c587

0097e1f008

Quoted 38 lines
Quoted 38 lines

Unable to checkout '9cc90b7976252b2d14b7956230c5870097e1f008' in submodule path 'doxygen2jsdoc'

Ross

Quoted 32 lines · Matt Hoosier

Although the submodules' histories have been fetched during the do_fetch() phase, the mechanics used to clone the workdir copy of the repo haven't been transferring the actual .git/modules directory from the repo fetched into downloads/ during the fetch task.

Fix that, and for good measure also explicitly tell Git to avoid hitting the network during do_unpack() of the submodules.

[YOCTO #12739]

---
 lib/bb/fetch2/gitsm.py | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)
lib/bb/fetch2/gitsm.py +5 -2
index 0aff1008..c5019e98 100644
@@ -132,4 +132,30 @@ class GitSM(Git):
 
         if self.uses_submodules(ud, d, ud.destdir):
             runfetchcmd(ud.basecmd + " checkout " +
 ud.revisions[ud.names[0]], d, workdir=ud.destdir)
-            runfetchcmd(ud.basecmd + " submodule update --init
--recursive", d, workdir=ud.destdir)
+
+            updateflags = ""
+
+            # Copy over the submodules' fetched histories too.
+            if ud.bareclone:
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
lib/bb/fetch2/gitsm.py +6 -0
+                repo_conf = ud.destdir
+            else:
+                repo_conf = os.path.join(ud.destdir, '.git')
+
+            if os.path.exists(ud.clonedir):
+                # This is not a copy unpacked from a shallow mirror

clone. So
+ # the manual intervention to populate the

.git/modules

Quoted 36 lines
Quoted 24 lines
Quoted 24 lines

done

lib/bb/fetch2/gitsm.py +2 -0
+                # in clone_shallow_local() won't have been done yet.
+                runfetchcmd("cp -fpPRH %s %s" %

(os.path.join(ud.clonedir, 'modules'), repo_conf), d)

lib/bb/fetch2/gitsm.py +3 -0
+                updateflags += " --no-fetch"
+            elif os.path.exists(os.path.join(repo_conf, 'modules')):
+                # Unpacked from a shallow mirror clone. Manual

population of

lib/bb/fetch2/gitsm.py +6 -0
+                # .git/modules is already done.
+                updateflags += " --no-fetch"
+            else:
+                # This isn't fatal; git-submodule will just fetch it
+                # during do_unpack().
+                bb.error("submodule history not retrieved during

do_fetch()")

lib/bb/fetch2/gitsm.py +2 -0
+
+            # Careful not to hit the network during unpacking; all

history should already

lib/bb/fetch2/gitsm.py +2 -2
+            # be fetched.
+            runfetchcmd(ud.basecmd + " submodule update --init
--recursive %s" % updateflags, d, workdir=ud.destdir)
--

2.13.6

Quoted 5 lines
Quoted 5 lines

--
_______________________________________________
bitbake-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/bitbake-devel

Okay, I'll have a look at that. Are there any other test suites I should know about?

Quoted 2 lines
#5 lore raw

These test cases failures are fixed up in the v5 submission:
http://lists.openembedded.org/pipermail/bitbake-devel/2018-May/009350.html.

Quoted 172 lines · Matt Hoosier

Right; I got enough context from your copied/pasted failure report to duplicate it. I'm just wondering if there are other test batteries besides bitbake-selftest and oe-selftest that are gates to clear?

-Matt

Quoted 160 lines · Ross

Hi Matt,

If you run oe-selftest -r devtool then it will run the tests which are failing.

Ross

Quoted 4 lines · Matt Hoosier
Quoted 3 lines · Ross

Sorry, but:

Quoted 8 lines
Quoted 8 lines
2018-05-14 18:57:44,968 - oe-selftest - INFO - FAIL:
test_devtool_add_fetch_git (devtool.DevtoolTests)
2018-05-14 18:57:44,968 - oe-selftest - INFO -
----------------------------------------------------------------------
2018-05-14 18:57:44,968 - oe-selftest - INFO - Traceback (most recent

call last):
File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-

selftest/build/meta/lib/oeqa/core/decorator/__init__.py",

Quoted 4 lines
Quoted 4 lines

line 32, in wrapped_f
return func(*args, **kwargs)
File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-

selftest/build/meta/lib/oeqa/selftest/cases/devtool.py",

Quoted 5 lines
Quoted 5 lines

line 403, in test_devtool_add_fetch_git

    result = runCmd('devtool add %s %s -f "%s" -V 1.5' % (testrecipe,

srcdir, url_rev))
File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-

selftest/build/meta/lib/oeqa/utils/commands.py",

Quoted 6 lines
Quoted 6 lines

line 191, in runCmd
raise AssertionError("Command '%s' returned non-zero exit status
%d:\n%s" % (command, result.status, exc_output))
AssertionError: Command 'devtool add mraa /tmp/devtoolqa0aghorcw/mraa -f "gitsm://git.yoctoproject.org/mraa;rev=ae127b19a50aa54255e43

30ccfdd9a5d058e581d"

Quoted 6 lines
Quoted 6 lines

-V 1.5' returned non-zero exit status 1:
...

ERROR: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export

PATH="/home/pokybuild/yocto-autobuilder/yocto-worker/nightly

-oe-selftest/build/build/tmp/sysroots-uninative/x86_64- linux/usr/bin:/home/pokybuild/yocto-autobuilder/yocto- worker/nightly-oe-selftest/build/scripts:/home/pokybuild/ yocto-autobuilder/yocto-worker/nightly-oe-selftest/ build/build/tmp/work/recipetool-utucnynk/work/recipe- sysroot-native/usr/bin/x86_64-poky-linux:/home/pokybuild/ yocto-autobuilder/yocto-worker/nightly-oe-selftest/ build/build/tmp/work/recipetool-utucnynk/work/recipe- sysroot/usr/bin/crossscripts:/home/pokybuild/yocto- autobuilder/yocto-worker/nightly-oe-selftest/build/ build/tmp/work/recipetool-utucnynk/work/recipe-sysroot- native/usr/sbin:/home/pokybuild/yocto-autobuilder/ yocto-worker/nightly-oe-selftest/build/build/tmp/work/ recipetool-utucnynk/work/recipe-sysroot-native/usr/bin:
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/ build/tmp/work/recipetool-utucnynk/work/recipe-sysroot- native/sbin:/home/pokybuild/yocto-autobuilder/yocto- worker/nightly-oe-selftest/build/build/tmp/work/recipetool-utucnynk/work/ recipe-sysroot-native/bin:/home/pokybuild/yocto-autobuilder/yocto-worker/ nightly-oe-selftest/build/bitbake/bin:/home/pokybuild/ yocto-autobuilder/yocto-worker/nightly-oe-selftest/ build/build/tmp/hosttools";

Quoted 7 lines
Quoted 7 lines

export HOME="/home/pokybuild"; git -c core.fsyncobjectfiles=0 submodule update --init --recursive --no-fetch failed with exit code 1, output:
Submodule 'doxygen2jsdoc'
(https://github.com/arfoll/doxygen2jsdoc.git) registered for path 'doxygen2jsdoc'
fatal: reference is not a tree: 9cc90b7976252b2d14b7956230c587

0097e1f008

Quoted 38 lines
Quoted 38 lines

Unable to checkout '9cc90b7976252b2d14b7956230c5870097e1f008' in submodule path 'doxygen2jsdoc'

Ross

Quoted 32 lines · Matt Hoosier

Although the submodules' histories have been fetched during the do_fetch() phase, the mechanics used to clone the workdir copy of the repo haven't been transferring the actual .git/modules directory from the repo fetched into downloads/ during the fetch task.

Fix that, and for good measure also explicitly tell Git to avoid hitting the network during do_unpack() of the submodules.

[YOCTO #12739]

---
 lib/bb/fetch2/gitsm.py | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)
lib/bb/fetch2/gitsm.py +5 -2
index 0aff1008..c5019e98 100644
@@ -132,4 +132,30 @@ class GitSM(Git):
 
         if self.uses_submodules(ud, d, ud.destdir):
             runfetchcmd(ud.basecmd + " checkout " +
 ud.revisions[ud.names[0]], d, workdir=ud.destdir)
-            runfetchcmd(ud.basecmd + " submodule update --init
--recursive", d, workdir=ud.destdir)
+
+            updateflags = ""
+
+            # Copy over the submodules' fetched histories too.
+            if ud.bareclone:
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
lib/bb/fetch2/gitsm.py +6 -0
+                repo_conf = ud.destdir
+            else:
+                repo_conf = os.path.join(ud.destdir, '.git')
+
+            if os.path.exists(ud.clonedir):
+                # This is not a copy unpacked from a shallow mirror

clone. So
+ # the manual intervention to populate the

.git/modules

Quoted 6 lines
Quoted 6 lines

lib/bb/fetch2/gitsm.py

Quoted 6 lines

done

lib/bb/fetch2/gitsm.py +2 -0
+                # in clone_shallow_local() won't have been done yet.
+                runfetchcmd("cp -fpPRH %s %s" %

(os.path.join(ud.clonedir, 'modules'), repo_conf), d)

lib/bb/fetch2/gitsm.py +2 -0
+                updateflags += " --no-fetch"
+            elif os.path.exists(os.path.join(repo_conf,

'modules')):

Quoted 30 lines
Quoted 18 lines
Quoted 18 lines

+ # Unpacked from a shallow mirror clone. Manual
population of

lib/bb/fetch2/gitsm.py +6 -0
+                # .git/modules is already done.
+                updateflags += " --no-fetch"
+            else:
+                # This isn't fatal; git-submodule will just fetch it
+                # during do_unpack().
+                bb.error("submodule history not retrieved during

do_fetch()")

lib/bb/fetch2/gitsm.py +2 -0
+
+            # Careful not to hit the network during unpacking; all

history should already

lib/bb/fetch2/gitsm.py +2 -2
+            # be fetched.
+            runfetchcmd(ud.basecmd + " submodule update --init
--recursive %s" % updateflags, d, workdir=ud.destdir)
--

2.13.6

Quoted 5 lines
Quoted 5 lines

--
_______________________________________________
bitbake-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/bitbake-devel

Okay, I'll have a look at that. Are there any other test suites I should know about?

Quoted 2 lines