All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] tests/fetch: add test_git_submodule_branch_new_module
@ 2017-08-21 16:37 Christopher Larson
  2017-08-21 16:37 ` [PATCH 2/2] Revert "fetch2/gitsm: Fix when repository change submodules" Christopher Larson
  0 siblings, 1 reply; 8+ messages in thread
From: Christopher Larson @ 2017-08-21 16:37 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

This local test validates that we can switch branches for a gitsm URI and the
submodules are correct for that branch when unpacked.

[YOCTO #11830]

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 lib/bb/tests/fetch.py | 60 ++++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 57 insertions(+), 3 deletions(-)

diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py
index faa5c74a..f91621c0 100644
--- a/lib/bb/tests/fetch.py
+++ b/lib/bb/tests/fetch.py
@@ -19,11 +19,12 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #
 
-import unittest
-import tempfile
-import subprocess
 import collections
 import os
+import shutil
+import subprocess
+import tempfile
+import unittest
 from bb.fetch2 import URI
 from bb.fetch2 import FetchMethod
 import bb
@@ -517,6 +518,59 @@ class FetcherLocalTest(FetcherTest):
         with self.assertRaises(bb.fetch2.UnpackError):
             self.fetchUnpack(['file://a;subdir=/bin/sh'])
 
+    def test_git_submodule_branch_new_module(self):
+        def git(gitdir, *cmd):
+            if len(cmd) == 1 and isinstance(cmd[0], list, str):
+                cmd = cmd[0]
+
+            if isinstance(cmd, str):
+                cmd = 'git ' + cmd
+            else:
+                cmd = ['git'] + list(cmd)
+            return bb.process.run(cmd, cwd=gitdir)[0]
+
+        def newrepo(name):
+            gitdir = os.path.join(self.tempdir, name)
+            bb.process.run(['git', 'init', gitdir])
+            open(os.path.join(gitdir, 'a'), 'w').close()
+            git(gitdir, 'add', 'a')
+            git(gitdir, 'commit', '-m', 'add a')
+            return gitdir
+
+        sub1 = newrepo('upstream-submodule1')
+        upstream = newrepo('upstream')
+        git(upstream, 'submodule', 'add', sub1, 'sub1')
+        git(upstream, 'add', '.gitmodules')
+        git(upstream, 'commit', '-m', 'add submodule1')
+
+        git(upstream, 'checkout', '-b', 'with-sub2')
+        sub2 = newrepo('upstream-submodule2')
+        git(upstream, 'submodule', 'add', sub2, 'sub2')
+        git(upstream, 'add', '.gitmodules')
+        git(upstream, 'commit', '-m', 'add submodule2')
+
+        git(upstream, 'checkout', 'master')
+
+        self.d.setVar('SRCREV', '${@bb.fetch2.get_autorev(d)}')
+
+        bb.utils.mkdirhier(self.unpackdir)
+        tree = self.fetchUnpack(["gitsm://%s;protocol=file;branch=master" % upstream])
+        tree = filter(lambda f: not f.startswith('git/.git/'), tree)
+        self.assertEqual(list(tree), ['git/.gitmodules', 'git/a', 'git/sub1/.git', 'git/sub1/a'])
+
+        shutil.rmtree(self.unpackdir)
+        bb.utils.mkdirhier(self.unpackdir)
+        tree = self.fetchUnpack(["gitsm://%s;protocol=file;branch=with-sub2" % upstream])
+        tree = filter(lambda f: not f.startswith('git/.git/'), tree)
+        self.assertEqual(list(tree), ['git/.gitmodules', 'git/a', 'git/sub1/.git', 'git/sub1/a', 'git/sub2/.git', 'git/sub2/a'])
+
+        shutil.rmtree(self.unpackdir)
+        bb.utils.mkdirhier(self.unpackdir)
+        tree = self.fetchUnpack(["gitsm://%s;protocol=file;branch=master" % upstream])
+        tree = filter(lambda f: not f.startswith('git/.git/'), tree)
+        self.assertEqual(list(tree), ['git/.gitmodules', 'git/a', 'git/sub1/.git', 'git/sub1/a'])
+
+
 class FetcherNetworkTest(FetcherTest):
 
     if os.environ.get("BB_SKIP_NETTESTS") == "yes":
-- 
2.11.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] Revert "fetch2/gitsm: Fix when repository change submodules"
  2017-08-21 16:37 [PATCH 1/2] tests/fetch: add test_git_submodule_branch_new_module Christopher Larson
@ 2017-08-21 16:37 ` Christopher Larson
  2017-08-21 16:45   ` Christopher Larson
  2017-08-21 16:57   ` [PATCHv2] fetch2/gitsm: copy submodules from DL_DIR in unpack Christopher Larson
  0 siblings, 2 replies; 8+ messages in thread
From: Christopher Larson @ 2017-08-21 16:37 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

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.

[YOCTO #11830]

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 lib/bb/fetch2/gitsm.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/bb/fetch2/gitsm.py b/lib/bb/fetch2/gitsm.py
index 0aff1008..167b77a1 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('cp -fpPRH "%s/modules" "%s/"' % (ud.clonedir, os.path.join(ud.destdir, '.git')), d)
             runfetchcmd(ud.basecmd + " checkout " + ud.revisions[ud.names[0]], d, workdir=ud.destdir)
             runfetchcmd(ud.basecmd + " submodule update --init --recursive", d, workdir=ud.destdir)
-- 
2.11.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] Revert "fetch2/gitsm: Fix when repository change submodules"
  2017-08-21 16:37 ` [PATCH 2/2] Revert "fetch2/gitsm: Fix when repository change submodules" Christopher Larson
@ 2017-08-21 16:45   ` Christopher Larson
  2017-08-21 16:57   ` [PATCHv2] fetch2/gitsm: copy submodules from DL_DIR in unpack Christopher Larson
  1 sibling, 0 replies; 8+ messages in thread
From: Christopher Larson @ 2017-08-21 16:45 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Christopher Larson

[-- Attachment #1: Type: text/plain, Size: 686 bytes --]

On Mon, Aug 21, 2017 at 9:37 AM, Christopher Larson <kergoth@gmail.com>
wrote:

> From: Christopher Larson <chris_larson@mentor.com>
>
> 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.
>
> [YOCTO #11830]
>
> Signed-off-by: Christopher Larson <chris_larson@mentor.com>


Hold off on this for the moment, looks like it broke use of gitshallow.
Fixing now.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 1290 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCHv2] fetch2/gitsm: copy submodules from DL_DIR in unpack
  2017-08-21 16:37 ` [PATCH 2/2] Revert "fetch2/gitsm: Fix when repository change submodules" Christopher Larson
  2017-08-21 16:45   ` Christopher Larson
@ 2017-08-21 16:57   ` Christopher Larson
  2017-08-21 16:57     ` Christopher Larson
  2017-08-23 10:22     ` Richard Purdie
  1 sibling, 2 replies; 8+ messages in thread
From: Christopher Larson @ 2017-08-21 16:57 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

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@mentor.com>
---
 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 0aff1008..ed94c3d7 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)
-- 
2.11.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCHv2] fetch2/gitsm: copy submodules from DL_DIR in unpack
  2017-08-21 16:57   ` [PATCHv2] fetch2/gitsm: copy submodules from DL_DIR in unpack Christopher Larson
@ 2017-08-21 16:57     ` Christopher Larson
  2017-08-23 10:22     ` Richard Purdie
  1 sibling, 0 replies; 8+ messages in thread
From: Christopher Larson @ 2017-08-21 16:57 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Christopher Larson

[-- Attachment #1: Type: text/plain, Size: 1681 bytes --]

Supercedes "[PATCH 2/2] Revert "fetch2/gitsm: Fix when repository change
submodules””.

On Mon, Aug 21, 2017 at 9:57 AM, Christopher Larson <kergoth@gmail.com>
wrote:

> From: Christopher Larson <chris_larson@mentor.com>
>
> 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@mentor.com>
> ---
>  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 0aff1008..ed94c3d7 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)
> --
> 2.11.1
>
>


-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 2504 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCHv2] fetch2/gitsm: copy submodules from DL_DIR in unpack
  2017-08-21 16:57   ` [PATCHv2] fetch2/gitsm: copy submodules from DL_DIR in unpack Christopher Larson
  2017-08-21 16:57     ` Christopher Larson
@ 2017-08-23 10:22     ` Richard Purdie
  2017-08-23 15:01       ` Christopher Larson
  1 sibling, 1 reply; 8+ messages in thread
From: Richard Purdie @ 2017-08-23 10:22 UTC (permalink / raw)
  To: Christopher Larson, bitbake-devel; +Cc: Christopher Larson

On Mon, 2017-08-21 at 21:57 +0500, Christopher Larson wrote:
> From: Christopher Larson <chris_larson@mentor.com>
> 
> 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@mentor.com>
> ---
>  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 0aff1008..ed94c3d7 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)

With these two patches applied (as in master-next), I'm seeing:

$ oe-selftest -r devtool.DevtoolTests.test_devtool_add_fetch_git
2017-08-23 11:19:39,203 - oe-selftest - INFO - Adding layer libraries:
2017-08-23 11:19:39,204 - oe-selftest - INFO - 	/media/build1/poky/meta/lib
2017-08-23 11:19:39,204 - oe-selftest - INFO - 	/media/build1/poky/meta-yocto-bsp/lib
2017-08-23 11:19:39,204 - oe-selftest - INFO - 	/media/build1/poky/meta-selftest/lib
2017-08-23 11:19:39,204 - oe-selftest - INFO - Running bitbake -p
2017-08-23 11:19:41,433 - oe-selftest - INFO - Running tests...----------------------------------------------------------------------
2017-08-23 11:19:41,433 - oe-selftest - INFO - Adding: "include selftest.inc" in /media/build1/poky/build/conf/local.conf
2017-08-23 11:19:42,989 - oe-selftest - INFO -   test_devtool_add_fetch_git (devtool.DevtoolTests)
2017-08-23 11:20:14,813 - oe-selftest - WARNING - tearDown commands have failed: bitbake -c cleansstate mraa
2017-08-23 11:20:14,815 - oe-selftest - INFO -  ... FAIL (31.826s)
2017-08-23 11:20:14,819 - oe-selftest - INFO - ======================================================================
2017-08-23 11:20:14,819 - oe-selftest - INFO - FAIL [31.826s]: test_devtool_add_fetch_git (devtool.DevtoolTests)
2017-08-23 11:20:14,819 - oe-selftest - INFO - ----------------------------------------------------------------------
2017-08-23 11:20:14,819 - oe-selftest - INFO - Traceback (most recent call last):
  File "/media/build1/poky/meta/lib/oeqa/core/decorator/__init__.py", line 32, in wrapped_f
    return func(*args, **kwargs)
  File "/media/build1/poky/meta/lib/oeqa/selftest/cases/devtool.py", line 392, in test_devtool_add_fetch_git
    result = runCmd('devtool add %s %s -f "%s" -V 1.5' % (testrecipe, srcdir, url_rev))
  File "/media/build1/poky/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/devtoolqa9peegimn/mraa -f "gitsm://git.yoctoproject.org/mraa;rev=ae127b19a50aa54255e4330ccfdd9a5d058e581d" -V 1.5' returned non-zero exit status 1:
NOTE: Starting bitbake server...
WARNING: -f/--fetch option is deprecated - you can now simply specify the URL to fetch as a positional argument instead
NOTE: Starting bitbake server...
NOTE: Fetching gitsm://git.yoctoproject.org/mraa;rev=ae127b19a50aa54255e4330ccfdd9a5d058e581d;nobranch=1...
NOTE: Starting bitbake server...
Loading cache...done.
Loaded 1292 entries from dependency cache.
Parsing recipes...done.
Parsing of 835 .bb files complete (834 cached, 1 parsed). 1290 targets, 74 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.35.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "universal"
TARGET_SYS        = "mips-poky-linux"
MACHINE           = "qemumips"
DISTRO            = "poky"
DISTRO_VERSION    = "2.3"
TUNE_FEATURES     = "o32 bigendian fpu-hard mips32r2"
TARGET_FPU        = ""
meta              
meta-poky         
meta-yocto-bsp    = "wip:fb706fa5934fab53c0858d7e9a36c07e3fb7bb65"
meta-mingw        = "master:0679d2a91575bd7f3efd0973aa99d7ee681e9395"
meta-selftest     
workspace         = "wip:fb706fa5934fab53c0858d7e9a36c07e3fb7bb65"

Initialising tasks...done.
NOTE: Executing RunQueue Tasks
ERROR: Fetcher failure: Fetch command export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"; export PATH="/media/build1/poky/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/media/build1/poky/scripts:/media/build1/poky/build/tmp/work/recipetool-1fxlbrau/work/recipe-sysroot-native/usr/bin/mips-poky-linux:/media/build1/poky/build/tmp/work/recipetool-1fxlbrau/work/recipe-sysroot/usr/bin/crossscripts:/media/build1/poky/build/tmp/work/recipetool-1fxlbrau/work/recipe-sysroot-native/usr/sbin:/media/build1/poky/build/tmp/work/recipetool-1fxlbrau/work/recipe-sysroot-native/usr/bin:/media/build1/poky/build/tmp/work/recipetool-1fxlbrau/work/recipe-sysroot-native/sbin:/media/build1/poky/build/tmp/work/recipetool-1fxlbrau/work/recipe-sysroot-native/bin:/media/build1/poky/bitbake/bin:/media/build1/poky/build/tmp/hosttools"; export HOME="/home/richard"; git -c core.fsyncobjectfiles=0 submodule update --init --recursive failed with exit code 1, output:
Submodule 'doxygen2jsdoc' (https://github.com/arfoll/doxygen2jsdoc.git) registered for path 'doxygen2jsdoc'
error: no such remote ref 9cc90b7976252b2d14b7956230c5870097e1f008
Fetched in submodule path 'doxygen2jsdoc', but it did not contain 9cc90b7976252b2d14b7956230c5870097e1f008. Direct fetching of that commit failed.

ERROR: Function failed: base_do_unpack
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn't need to be rerun and 1 failed.
ERROR: Failed to fetch URL gitsm://git.yoctoproject.org/mraa;rev=ae127b19a50aa54255e4330ccfdd9a5d058e581d;nobranch=1
ERROR: Command 'recipetool --color=auto create --devtool -o /tmp/devtoolqzsczjvq 'gitsm://git.yoctoproject.org/mraa;rev=ae127b19a50aa54255e4330ccfdd9a5d058e581d'  -x /tmp/devtoolqa9peegimn/mraa -N mraa -V 1.5' failed
----------------------------------------------------------------------
2017-08-23 11:20:14,819 - oe-selftest - INFO - Ran 1 test in 33.385s
2017-08-23 11:20:14,819 - oe-selftest - INFO - FAILED
2017-08-23 11:20:14,819 - oe-selftest - INFO -  (failures=1)
2017-08-23 11:20:14,824 - oe-selftest - INFO - RESULTS:
2017-08-23 11:20:14,824 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_add_fetch_git - Testcase 1161: FAILED
2017-08-23 11:20:14,824 - oe-selftest - INFO - SUMMARY:
2017-08-23 11:20:14,824 - oe-selftest - INFO - oe-selftest () - Ran 1 test in 33.391s
2017-08-23 11:20:14,824 - oe-selftest - INFO - oe-selftest - FAIL - Required tests failed

Could you take a look at that test case and see what the issue is please?

Cheers,

Richard


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCHv2] fetch2/gitsm: copy submodules from DL_DIR in unpack
  2017-08-23 10:22     ` Richard Purdie
@ 2017-08-23 15:01       ` Christopher Larson
  2017-08-23 16:53         ` Christopher Larson
  0 siblings, 1 reply; 8+ messages in thread
From: Christopher Larson @ 2017-08-23 15:01 UTC (permalink / raw)
  To: Richard Purdie; +Cc: bitbake-devel

[-- Attachment #1: Type: text/plain, Size: 1355 bytes --]

On Wed, Aug 23, 2017 at 3:22 AM, Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:

> On Mon, 2017-08-21 at 21:57 +0500, Christopher Larson wrote:
> > From: Christopher Larson <chris_larson@mentor.com>
> >
> > Revert "fetch2/gitsm: Fix when repository change submodules"
> >
> > This reverts commit 12f6c0651af8bd5d6efb751690571cf2fcd3eeb0.
>
[…]

> 2017-08-23 11:20:14,819 - oe-selftest - INFO - Ran 1 test in 33.385s
> 2017-08-23 11:20:14,819 - oe-selftest - INFO - FAILED
> 2017-08-23 11:20:14,819 - oe-selftest - INFO -  (failures=1)
> 2017-08-23 11:20:14,824 - oe-selftest - INFO - RESULTS:
> 2017-08-23 11:20:14,824 - oe-selftest - INFO - RESULTS -
> devtool.DevtoolTests.test_devtool_add_fetch_git - Testcase 1161: FAILED
> 2017-08-23 11:20:14,824 - oe-selftest - INFO - SUMMARY:
> 2017-08-23 11:20:14,824 - oe-selftest - INFO - oe-selftest () - Ran 1 test
> in 33.391s
> 2017-08-23 11:20:14,824 - oe-selftest - INFO - oe-selftest - FAIL -
> Required tests failed
>
> Could you take a look at that test case and see what the issue is please?
>

Will do, thanks, sorry about that. I ran the bitbake selftests, but didn’t
think to re-run the oe selftests. *eyeroll*

-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 2167 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCHv2] fetch2/gitsm: copy submodules from DL_DIR in unpack
  2017-08-23 15:01       ` Christopher Larson
@ 2017-08-23 16:53         ` Christopher Larson
  0 siblings, 0 replies; 8+ messages in thread
From: Christopher Larson @ 2017-08-23 16:53 UTC (permalink / raw)
  To: Richard Purdie; +Cc: bitbake-devel

[-- Attachment #1: Type: text/plain, Size: 2336 bytes --]

On Wed, Aug 23, 2017 at 8:01 AM, Christopher Larson <kergoth@gmail.com>
wrote:

> On Wed, Aug 23, 2017 at 3:22 AM, Richard Purdie <richard.purdie@
> linuxfoundation.org> wrote:
>
>> On Mon, 2017-08-21 at 21:57 +0500, Christopher Larson wrote:
>> > From: Christopher Larson <chris_larson@mentor.com>
>> >
>> > Revert "fetch2/gitsm: Fix when repository change submodules"
>> >
>> > This reverts commit 12f6c0651af8bd5d6efb751690571cf2fcd3eeb0.
>>
> […]
>
>> 2017-08-23 11:20:14,819 - oe-selftest - INFO - Ran 1 test in 33.385s
>> 2017-08-23 11:20:14,819 - oe-selftest - INFO - FAILED
>> 2017-08-23 11:20:14,819 - oe-selftest - INFO -  (failures=1)
>> 2017-08-23 11:20:14,824 - oe-selftest - INFO - RESULTS:
>> 2017-08-23 11:20:14,824 - oe-selftest - INFO - RESULTS -
>> devtool.DevtoolTests.test_devtool_add_fetch_git - Testcase 1161: FAILED
>> 2017-08-23 11:20:14,824 - oe-selftest - INFO - SUMMARY:
>> 2017-08-23 11:20:14,824 - oe-selftest - INFO - oe-selftest () - Ran 1
>> test in 33.391s
>> 2017-08-23 11:20:14,824 - oe-selftest - INFO - oe-selftest - FAIL -
>> Required tests failed
>>
>> Could you take a look at that test case and see what the issue is please?
>>
>
> Will do, thanks, sorry about that. I ran the bitbake selftests, but didn’t
> think to re-run the oe selftests. *eyeroll*
>


This is uglier than I had been thinking. If the upstream url for an
existing module changes between srcrevs or branches, we’re in trouble,
since the modules/ dir in clonedir won’t line up with .gitmodules. I was
thinking about adding a needs_update() to GitSM to check for the case where
it doesn’t match up, but then if multiple recipes need different sets of
modules for the same clonedir at the same time, they’d both run download()
and first one would switch to one configuration, then the other would
switch back..

The perils of using a single directory in a single clone for multiple
possible sets of modules and revs.. I don’t think it’s worth trying to
handle this with a stopgap measure, best to just punt on this for this
release and pursue the rewrite of gitsm after the release. Feel free to
drop these patches. Thanks.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 3646 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-08-23 16:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-21 16:37 [PATCH 1/2] tests/fetch: add test_git_submodule_branch_new_module Christopher Larson
2017-08-21 16:37 ` [PATCH 2/2] Revert "fetch2/gitsm: Fix when repository change submodules" Christopher Larson
2017-08-21 16:45   ` Christopher Larson
2017-08-21 16:57   ` [PATCHv2] fetch2/gitsm: copy submodules from DL_DIR in unpack Christopher Larson
2017-08-21 16:57     ` Christopher Larson
2017-08-23 10:22     ` Richard Purdie
2017-08-23 15:01       ` Christopher Larson
2017-08-23 16:53         ` Christopher Larson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.