I also need to revoke this patch. I forgot I am not able to recreate this issue 
on my local setup, and I have only seen it on the build machine. 

This patch will cause a build failure if any of the oe* package indexes are 
empty, as the " grep -n "^Package" $pkg_idx" will return an error.

Are there any other comments which I may address in the v3?

Thanks,
Jake

-----Original Message-----
From: Stiffler, Jacob 
Sent: Friday, March 06, 2015 9:34 AM
To: [email protected]
Cc: Stiffler, Jacob
Subject: [PATCH v2] tisdk-image: Fix manifest generation for nativesdk.

* The manifest is automatically generated based on *.control
  files found within the various images.
* The control files for the nativesdk image have gone missing.
* Work around this by regenerating the control files from the
  package index.

Signed-off-by: Jacob Stiffler <[email protected]>
---
v2 changes:
Parse all "oe*" package indexes instead of only "oe-*-nativesdk" indexes.


 meta-arago-distro/classes/tisdk-image.bbclass |   37 +++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/meta-arago-distro/classes/tisdk-image.bbclass 
b/meta-arago-distro/classes/tisdk-image.bbclass
index 3030a38..b9d86af 100644
--- a/meta-arago-distro/classes/tisdk-image.bbclass
+++ b/meta-arago-distro/classes/tisdk-image.bbclass
@@ -353,6 +353,43 @@ echo "
 </tr>
 " >> ${SW_MANIFEST_FILE}
 
+    control_files_there=0
+    for possible_control_file in $control_dir/*.control
+    do
+        if [ -f $possible_control_file ]
+        then
+            control_files_there=1
+            break
+        fi
+    done
+
+    if [ $control_files_there -eq 0 ]
+    then
+        for pkg_idx in $control_dir/oe*; do
+            package_start=`grep -n "^Package" $pkg_idx`
+
+            IFS_OLD=${IFS}
+            IFS="
+"
+
+            for pkg in ${package_start}; do
+                end=`echo $pkg | cut -d: -f1`
+
+                if [ -z $begin ]; then
+                    pkg_name=`echo $pkg | cut -d: -f3`
+                    begin=`echo $pkg | cut -d: -f1`
+                    continue
+                fi
+                cnt=$[$cnt+1]
+                head -n $[$end - 1] $pkg_idx | tail -n $[$end - $begin] > 
${control_dir}/${pkg_name// /}.control
+
+                pkg_name=`echo $pkg | cut -d: -f3`
+                begin=$end
+            done
+            IFS=${IFS_OLD}
+        done
+    fi
+
     for i in $control_dir/*.control
     do
         package="`cat $i | grep Package: | awk {'print $2'}`"
-- 
1.7.9.5

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

Reply via email to