diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-05-08 15:08:13 -0400 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2016-05-12 11:53:30 -0400 |
commit | 093942197237a0b79802d20ebcf3ae0ea35a66bc (patch) | |
tree | ce8a972259ad170f429a8f52df264ff6a4488701 | |
parent | 00ec8bc10df539ecedc3beb2dde28a8e4665cad8 (diff) | |
download | meta-openembedded-093942197237a0b79802d20ebcf3ae0ea35a66bc.tar.gz |
netcf: fix mishandling of gnulib submodule causing build fail
netcf fails to build on certain hosts with newer versions
of git installed as follows:
| ./bootstrap: Bootstrapping from checked-out netcf sources...
| ./bootstrap: consider installing git-merge-changelog from gnulib
| ./bootstrap: getting gnulib files...
| error: pathspec 'gnulib' did not match any file(s) known to git.
If we do a devshell we will see that our configure prepend that
intended to _create_ the .gitmodules has instead _modified_ it
and left us with this change present:
sh-4.3# git diff
diff --git a/.gitmodules b/.gitmodules
index 7acb1ea19ca7..2d10b0e0e0fe 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,3 @@
[submodule "gnulib"]
- path = .gnulib
- url = git://git.sv.gnu.org/gnulib.git
+ path = gnulib
+ url = git://git.sv.gnu.org/gnulib
sh-4.3#
What happens is that the newer git does not respect uncommitted
changes to the .gitmodules file, and hence the path ".gnulib" is
still considered valid vs. the in tree updated path "gnulib". It
doesn't help any that the package has its own tracked files in
gnulib/ that we stomp over, but the real fail is just uncommitted
changes to the .gitmodule as this insertion of a random path shows:
sh-4.3# git diff
diff --git a/.gitmodules b/.gitmodules
index 7acb1ea19ca7..91bd45f8e4d4 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,3 @@
[submodule "gnulib"]
- path = .gnulib
+ path = gnulibaaa
url = git://git.sv.gnu.org/gnulib.git
sh-4.3# git --version
git version 2.7.4
sh-4.3# git submodule init
fatal: no submodule mapping found in .gitmodules for path '.gnulib'
sh-4.3#
Since the original bbclass simply assumed there was no .gitmodules
file to begin with, we can easily solve this by not clobbering it
and respect the path choice used by the package itself.
As the version of ./bootstrap shipped with netcf supports this:
--no-git do not use git to update gnulib. Requires that
--gnulib-srcdir point to a correct gnulib snapshot
we can use it in conjunction with the pathspec since we know the
gnulib was just copied in from the sysroot, and does not need
to try and pull any further updates.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
-rw-r--r-- | meta-networking/recipes-support/netcf/netcf_git.bb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/meta-networking/recipes-support/netcf/netcf_git.bb b/meta-networking/recipes-support/netcf/netcf_git.bb index f67f4ec60..8d6d32a60 100644 --- a/meta-networking/recipes-support/netcf/netcf_git.bb +++ b/meta-networking/recipes-support/netcf/netcf_git.bb | |||
@@ -28,18 +28,17 @@ do_configure_prepend() { | |||
28 | cd ${S} | 28 | cd ${S} |
29 | 29 | ||
30 | # avoid bootstrap cloning gnulib on every configure | 30 | # avoid bootstrap cloning gnulib on every configure |
31 | cat >.gitmodules <<EOF | 31 | # the rmdir acts as a sentinel to let us know if the pkg ever changes |
32 | [submodule "gnulib"] | 32 | # the path for GNUlib or populates the dir making it non-empty. |
33 | path = gnulib | 33 | rmdir ${S}/.gnulib |
34 | url = git://git.sv.gnu.org/gnulib | 34 | cp -rf ${STAGING_DATADIR}/gnulib ${S}/.gnulib |
35 | EOF | ||
36 | cp -rf ${STAGING_DATADIR}/gnulib ${S} | ||
37 | 35 | ||
38 | # --force to avoid errors on reconfigure e.g if recipes changed we depend on | 36 | # --force to avoid errors on reconfigure e.g if recipes changed we depend on |
39 | # | bootstrap: running: libtoolize --quiet | 37 | # | bootstrap: running: libtoolize --quiet |
40 | # | libtoolize: error: 'libltdl/COPYING.LIB' exists: use '--force' to overwrite | 38 | # | libtoolize: error: 'libltdl/COPYING.LIB' exists: use '--force' to overwrite |
41 | # | ... | 39 | # | ... |
42 | ./bootstrap --force | 40 | ./bootstrap --force --no-git --gnulib-srcdir=.gnulib |
41 | |||
43 | cd $currdir | 42 | cd $currdir |
44 | } | 43 | } |
45 | 44 | ||