summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-10-01 15:38:55 +0000
committerRichard Purdie <richard@openedhand.com>2008-10-01 15:38:55 +0000
commit18104e12167d04945c3d09e580172a3186ed9efe (patch)
treeffdf9d500ede885072f85b5a7b1ffd6e50bf1981
parentd96b9e37ffb91fa67497f9fb6032e1da7f7dd81f (diff)
downloadpoky-18104e12167d04945c3d09e580172a3186ed9efe.tar.gz
rootfs_ipk.bbclass: Add the hard bit of image generation from feeds, controlled by a BUILD_IMAGES_FROM_FEEDS variable
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5372 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--meta/classes/rootfs_ipk.bbclass35
1 files changed, 34 insertions, 1 deletions
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 5e8a9c720c..fdedc44e58 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -13,11 +13,14 @@ do_rootfs[recrdeptask] += "do_package_write_ipk"
13 13
14IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS}" 14IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS}"
15 15
16OPKG_FEED_URIS = ""
17
16fakeroot rootfs_ipk_do_rootfs () { 18fakeroot rootfs_ipk_do_rootfs () {
17 set -x 19 set -x
18 20
19 package_update_index_ipk 21 package_update_index_ipk
20 package_generate_ipkg_conf 22 package_generate_ipkg_conf
23 ${OPKG_FEED_URIS}
21 24
22 mkdir -p ${T}/ 25 mkdir -p ${T}/
23 mkdir -p ${IMAGE_ROOTFS}/usr/lib/opkg/ 26 mkdir -p ${IMAGE_ROOTFS}/usr/lib/opkg/
@@ -95,7 +98,7 @@ install_all_locales() {
95 98
96 PACKAGES_TO_INSTALL="" 99 PACKAGES_TO_INSTALL=""
97 100
98 INSTALLED_PACKAGES=`grep ^Package: ${IMAGE_ROOTFS}${libdir}/opkg/status |sed "s/^Package: //"|egrep -v -- "(-locale-|-dev$|-doc$|^kernel|^glibc|^ttf|^task|^perl|^python)"` 101 INSTALLED_PACKAGES=`grep ^Package: ${IMAGE_ROOTFS}${libdir}/opkg/status |sed "s/^Package: //"|egrep -v -- "(-locale-|-dev$|-doc$|^kernel|^glibc|^ttf|^task|^perl|^python)"`
99 102
100 for pkg in $INSTALLED_PACKAGES 103 for pkg in $INSTALLED_PACKAGES
101 do 104 do
@@ -113,3 +116,33 @@ install_all_locales() {
113 fi 116 fi
114} 117}
115 118
119ipk_insert_feed_uris () {
120
121 echo "Building from feeds activated!"
122
123 for line in ${FEED_URIS}
124 do
125 # strip leading and trailing spaces/tabs, then split into name and uri
126 line_clean="`echo "$line"|sed 's/^[ \t]*//;s/[ \t]*$//'`"
127 feed_name="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\1/p'`"
128 feed_uri="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\2/p'`"
129
130 echo "Added $feed_name feed with URL $feed_uri"
131
132 # insert new feed-sources
133 echo "src/gz $feed_name $feed_uri" >> ${IPKGCONF_TARGET}
134 done
135}
136
137python () {
138 import bb
139 if bb.data.getVar('BUILD_IMAGES_FROM_FEEDS', d, True):
140 flags = bb.data.getVarFlag('do_rootfs', 'recrdeptask', d)
141 flags = flags.replace("do_package_write_ipk", "")
142 flags = flags.replace("do_deploy", "")
143 flags = flags.replace("do_populate_staging", "")
144 bb.data.setVarFlag('do_rootfs', 'recrdeptask', flags, d)
145 bb.data.setVar('OPKG_FEED_URIS', 'ipk_insert_feed_uris', d)
146}
147
148