Patchwork [CONSOLIDATED,PULL,01/16] base.bbclass: add subversion-native to DEPENDS if there is svn:// in SRC_URI

login
register
mail settings
Submitter Saul Wold
Date Nov. 15, 2011, 8:58 p.m.
Message ID <523f4b2508e897e1703ec3096d2da84dd036c306.1321389699.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/14989/
State New
Headers show

Comments

Saul Wold - Nov. 15, 2011, 8:58 p.m.
From: Martin Jansa <Martin.Jansa@gmail.com>

* in some cases this could cause circual dependency (ie if we decide to
  apr_svn.bb or something like that before subversion-native in dependency
  tree), Saul said he had such case, but I wasn't able to reproduce it
  here (here it builds subversion-native-1.7.0 fine).

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/base.bbclass |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

Patch

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index f3f798f..ba1f230 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -401,8 +401,14 @@  python () {
                     bb.note("SKIPPING %s because it's %s" % (pn, this_license))
                     raise bb.parse.SkipPackage("incompatible with license %s" % this_license)
 
-    # Git packages should DEPEND on git-native
     srcuri = d.getVar('SRC_URI', 1)
+    # Svn packages should DEPEND on subversion-native
+    if "svn://" in srcuri:
+        depends = d.getVarFlag('do_fetch', 'depends') or ""
+        depends = depends + " subversion-native:do_populate_sysroot"
+        d.setVarFlag('do_fetch', 'depends', depends)
+
+    # Git packages should DEPEND on git-native
     if "git://" in srcuri:
         depends = d.getVarFlag('do_fetch', 'depends') or ""
         depends = depends + " git-native:do_populate_sysroot"