Skip to contentSkip to conversation

talloc: fixes for sstate cache reuse & swig dependencies

PATCH New [email protected] 1 participant 3 messages Sep 17, 2014

lore
Share & tools
lore
#0 lore raw

cover talloc: fixes for sstate cache reuse & swig dependencies

From: Wenzong Fan <[email protected]>

Patch 2/2:

Fixes for sstate cache reuse between different build dirs. The ${SWIGLIBDIR##${STAGING_DIR_NATIVE}} had confused bitbake, bitbake would add the "SWIGLIBDIR##${STAGING_DIR_NATIVE}" to the deps of do_install, which caused the sstate cached can't be re-used.

Use another way for SWIGLIBDIR to fix the problem.

Patch 1/2:

* talloc: fix swig dependencies

This patch had been sent before, to avoid merge conflict just put them to the same contrib branch.

The following changes since commit 28e26a9b0ad37d0c92ba42b2727215eef1edf5a2:

tcpslice: add recipe under tcpdump (2014-09-09 10:32:51 -0400)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib wenzong/fix-talloc
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=wenzong/fix-talloc

Robert Yang (1):
talloc: fixes for sstate cache reuse

Wenzong Fan (1):
talloc: fix swig dependencies

 .../install-swig-interface-in-SWINGLIBDIR.patch    |    2 +-
 meta-oe/recipes-support/talloc/talloc_2.0.1.bb     |   13 +++++++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/2 talloc: fix swig dependencies

From: Wenzong Fan <[email protected]>

* depens on swig-native to make sure that the talloc.i always be installed;

* remove relative path that from swig -swiglib:

    ${D}/usr/bin/../share -> ${D}/usr/share
  This prevents 'install' from creraing empty dir: ${D}${bindir};

* fix the path to talloc.i for separate build.

---
 .../install-swig-interface-in-SWINGLIBDIR.patch    |    2 +-
 meta-oe/recipes-support/talloc/talloc_2.0.1.bb     |    5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)
meta-oe/recipes-support/talloc/talloc/install-swig-interface-in-SWINGLIBDIR.patch +1 -1
index e1339a0..635c60e 100644
@@ -17,7 +17,7 @@ Index: talloc-2.0.1/talloc.mk
 -	which swig >/dev/null 2>&1 && ${INSTALLCMD} -d $(DESTDIR)`swig -swiglib` || true
 -	which swig >/dev/null 2>&1 && ${INSTALLCMD} -m 644 talloc.i $(DESTDIR)`swig -swiglib` || true
 +	which swig >/dev/null 2>&1 && ${INSTALLCMD} -d $(DESTDIR)/$(SWIGLIBDIR) || true
-+	which swig >/dev/null 2>&1 && ${INSTALLCMD} -m 644 talloc.i $(DESTDIR)/$(SWIGLIBDIR) || true
++	which swig >/dev/null 2>&1 && ${INSTALLCMD} -m 644 $(srcdir)/$(tallocdir)/talloc.i $(DESTDIR)/$(SWIGLIBDIR) || true
  
  doc:: talloc.3 talloc.3.html
  
meta-oe/recipes-support/talloc/talloc_2.0.1.bb +3 -2
index 48c0915..9cf3e43 100644
@@ -18,10 +18,12 @@ PR = "r2"
 
 EXTRA_AUTORECONF = "--exclude=autopoint --exclude=aclocal"
 
+DEPENDS += "swig-native"
+
 do_install_prepend() {
     # Hack the way swig interface for talloc is installed
     # This hack is accompanied by install-swig-interface-in-SWINGLIBDIR.patch
-    type swig > /dev/null 2>&1 && SWIGLIBDIR=`swig -swiglib` && SWIGLIBDIR=${SWIGLIBDIR##${STAGING_DIR_NATIVE}} && export SWIGLIBDIR || echo "No swig found"
+    type swig > /dev/null 2>&1 && SWIGLIBDIR=`swig -swiglib` && SWIGLIBDIR=`readlink -f ${SWIGLIBDIR}` && SWIGLIBDIR=${SWIGLIBDIR##${STAGING_DIR_NATIVE}} && export SWIGLIBDIR || echo "No swig found"
 }
 
 do_install_append() {
@@ -29,7 +31,6 @@ do_install_append() {
     ln -s libtalloc.so.2.0.1 ${D}${libdir}/libtalloc.so.2.0
     ln -s libtalloc.so.2.0 ${D}${libdir}/libtalloc.so.2
     ln -s libtalloc.so.2 ${D}${libdir}/libtalloc.so
-    rmdir ${D}${bindir}
 }
 
 PACKAGES += "${PN}-swig"
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/2 talloc: fixes for sstate cache reuse

In reply to [email protected]

From: Robert Yang <[email protected]>

Fixes for sstate cache reuse between different build dirs. The ${SWIGLIBDIR##${STAGING_DIR_NATIVE}} had confused bitbake, bitbake would add the "SWIGLIBDIR##${STAGING_DIR_NATIVE}" to the deps of do_install, which caused the sstate cached can't be re-used.

Use another way for SWIGLIBDIR to fix the problem.

---
 meta-oe/recipes-support/talloc/talloc_2.0.1.bb |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
meta-oe/recipes-support/talloc/talloc_2.0.1.bb +9 -1
index 9cf3e43..7bbfbc2 100644
@@ -23,7 +23,15 @@ DEPENDS += "swig-native"
 do_install_prepend() {
     # Hack the way swig interface for talloc is installed
     # This hack is accompanied by install-swig-interface-in-SWINGLIBDIR.patch
-    type swig > /dev/null 2>&1 && SWIGLIBDIR=`swig -swiglib` && SWIGLIBDIR=`readlink -f ${SWIGLIBDIR}` && SWIGLIBDIR=${SWIGLIBDIR##${STAGING_DIR_NATIVE}} && export SWIGLIBDIR || echo "No swig found"
+    if which swig > /dev/null; then
+        SWIGLIBDIR="$(echo $(readlink -f $(swig -swiglib)) | \
+            sed -e 's#^${STAGING_DIR_NATIVE}##')"
+    fi
+    if [ -n "$SWIGLIBDIR" ]; then
+        export SWIGLIBDIR
+    else
+        echo "No swig found"
+    fi
 }
 
 do_install_append() {
Signature · 1 line
1.7.9.5