Signed-off-by: Jacob Stiffler <[email protected]>
---

This mostly works except for adding the 'do_emit_recipe_data_all' as
a dependency for the do_rootfs task.

 meta-arago-distro/classes/tisdk-image.bbclass | 26 +++++++++++++++++++++++++-
 meta-arago-distro/conf/distro/arago.conf      |  3 +++
 2 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/meta-arago-distro/classes/tisdk-image.bbclass 
b/meta-arago-distro/classes/tisdk-image.bbclass
index 0a0c570..8a91268 100644
--- a/meta-arago-distro/classes/tisdk-image.bbclass
+++ b/meta-arago-distro/classes/tisdk-image.bbclass
@@ -85,6 +85,8 @@ do_rootfs[depends] += "${@string_set('%s:do_image_complete' % 
pn for pn in (d.ge
 # available for packaging
 do_rootfs[depends] += "${@string_set('%s:do_populate_sdk' % pn for pn in 
(d.getVar("TISDK_TOOLCHAIN", True) or "").split())}"
 
+# Add dependency to collect recipe data for dependencies
+do_rootfs[recrdeptask] += "do_emit_recipe_data_all"
 do_rootfs[nostamp] = "1"
 do_rootfs[lockfiles] += "${IMAGE_ROOTFS}.lock"
 do_rootfs[cleandirs] += "${S}"
@@ -447,6 +449,24 @@ sw_manifest_host() {
     sw_manifest_table_footer
 }
 
+
+get_sources_from_recipe(){
+    [ ! -z "$1" ] || return 0
+
+    supported=${@bb.utils.contains('RECIPE_DATA_VARS', 'SRC_URI', 'yes', 'no', 
d)}
+    if [ "$supported" != "yes" ]
+    then
+        echo "$1"
+        return
+    fi
+
+    pn=$(echo "$1" | sed -e 's|_.*$||')
+
+    [ ! -z "$pn" ] || bbwarn "cannot find $1"
+
+    sed -ne 's|SRC_URI_pn-'$pn'[ \t]*=[ \t]*"\([^"]*\)"|\1|p' 
${RECIPE_DATA_FILE}
+}
+
 # This function expects to be passed the following parameter
 #   - The location to the opkg info directory containing the control files
 #     of the installed packages
@@ -457,6 +477,9 @@ generate_sw_manifest_table() {
     control_dir="$1"
     gplv3_only="$2"
 
+    # Call this here so that the function gets added to the task script
+    get_sources_from_recipe
+
     if [ ! -d "$control_dir" ]
     then
         echo "Could not find the control directory ($control_dir)"
@@ -546,7 +569,8 @@ EOF
         long_version="`cat $i | grep Version: | awk {'print $2'}`"
         license="`cat $i | grep License: | cut -d: -f2 `"
         architecture="`cat $i | grep Architecture: | awk {'print $2'}`"
-        sources="`cat $i | grep Source: | cut -d ':' -f2-`"
+        recipe="`cat $i | grep Source: | cut -d ':' -f2-`"
+        sources="`get_sources_from_recipe $recipe`"
         location="$package""_""$long_version""_""$architecture"".ipk"
 
         # Set the highlight color if the license in GPLv3.  If this is
diff --git a/meta-arago-distro/conf/distro/arago.conf 
b/meta-arago-distro/conf/distro/arago.conf
index c13e0b8..aa49413 100644
--- a/meta-arago-distro/conf/distro/arago.conf
+++ b/meta-arago-distro/conf/distro/arago.conf
@@ -130,6 +130,9 @@ require conf/distro/include/toolchain-${TOOLCHAIN_TYPE}.inc
 #TARGET_CPPFLAGS += "-fstack-protector -D_FORTIFY_SOURCE=1"
 #TARGET_CPPFLAGS += "-fstack-protector"
 
+# Needed for SW manifest generation in tisdk-image.bbclass
+INHERIT += "recipe-data"
+
 # Load default preferences
 require conf/distro/include/arago-prefs.inc
 
-- 
2.7.4

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

Reply via email to