summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/image_ipk.oeclass43
-rw-r--r--meta/opie-image.oe47
2 files changed, 62 insertions, 28 deletions
diff --git a/classes/image_ipk.oeclass b/classes/image_ipk.oeclass
index 6c741b9cf3..597d9d82d9 100644
--- a/classes/image_ipk.oeclass
+++ b/classes/image_ipk.oeclass
@@ -31,7 +31,9 @@ fakeroot do_rootfs () {
real_do_rootfs
- insert_feed_uris
+ insert_feed_uris
+
+ ${IMAGE_PREPROCESS_COMMAND}
export TOPDIR=${TOPDIR}
@@ -47,35 +49,26 @@ fakeroot do_rootfs () {
}
insert_feed_uris () {
-
- test -z "$FEED_URIS" && return 0
- # comment out existing feed-sources inserted by ipkg-collateral
- cat ${IMAGE_ROOTFS}/etc/ipkg.conf | sed "s/^src\ /#src\ /" > ${IMAGE_ROOTFS}/etc/ipkg.conf_
- rm ${IMAGE_ROOTFS}/etc/ipkg.conf && mv ${IMAGE_ROOTFS}/etc/ipkg.conf_ ${IMAGE_ROOTFS}/etc/ipkg.conf
-
- # extract, then delete destinations
- cat ${IMAGE_ROOTFS}/etc/ipkg.conf | egrep "^dest\ " > ${IMAGE_ROOTFS}/etc/ipkg.conf.dest
- cat ${IMAGE_ROOTFS}/etc/ipkg.conf | egrep -v "^dest\ " > ${IMAGE_ROOTFS}/etc/ipkg.conf_
- rm ${IMAGE_ROOTFS}/etc/ipkg.conf && mv ${IMAGE_ROOTFS}/etc/ipkg.conf_ ${IMAGE_ROOTFS}/etc/ipkg.conf
-
-
+ echo "Building feeds for [${DISTRO}].."
+
+ case "${DISTRO}" in
+ openzaurus*) FEED_URIS_="$FEED_URIS_openzaurus";;
+ familiar*) FEED_URIS_="$FEED_URIS_familiar";;
+ esac
+
+ ! test -z "$FEED_URIS_" && FEED_URIS="$FEED_URIS_"
+
for line in ${FEED_URIS}
do
-
# strip leading and trailing spaces/tabs, then split into name and uri
line_clean="`echo "$line"|sed 's/^[ \t]*//;s/[ \t]*$//'`"
feed_name="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\1/p'`"
- feed_uri="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\2/p'`"
-
+ feed_uri="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\2/p'`"
+
+ echo "Added $feed_name feed with URL $feed_uri"
+
# insert new feed-sources
- echo "src $feed_name $feed_uri" >> ${IMAGE_ROOTFS}/etc/ipkg.conf
- done
-
- # remove temporary files and rebuild ipkg.conf
- echo "" >> ${IMAGE_ROOTFS}/etc/ipkg.conf
- cat ${IMAGE_ROOTFS}/etc/ipkg.conf.dest >> ${IMAGE_ROOTFS}/etc/ipkg.conf
- rm ${IMAGE_ROOTFS}/etc/ipkg.conf.dest
-
- cp ${IMAGE_ROOTFS}/etc/ipkg.conf ${WORKDIR}
+ echo "src $feed_name $feed_uri" >> ${IMAGE_ROOTFS}/etc/ipkg/${feed_name}-feed.conf
+ done
}
diff --git a/meta/opie-image.oe b/meta/opie-image.oe
index 24c3f59603..9c10ddb9c7 100644
--- a/meta/opie-image.oe
+++ b/meta/opie-image.oe
@@ -1,9 +1,12 @@
export IMAGE_BASENAME = "opie-image"
export IMAGE_LINGUAS = ""
-export FEED_URIS = "OZ-3.5.1##http://openzaurus.org/official/unstable/3.5.1/feed/ \
- OZ-Upgrades##http://openzaurus.org/official/unstable/3.5.1/upgrades/"
+# The included feeds are choosen by ${DISTRO}
+export FEED_URIS_openzaurus = "OZ-3.5.1##http://openzaurus.org/official/unstable/3.5.1/feed/ \
+ OZ-Upgrades##http://openzaurus.org/official/unstable/3.5.1/upgrades/"
+export FEED_URIS_familiar = "OZ-3.5.1##http://openzaurus.org/official/unstable/3.5.1/feed/ \
+ OZ-Upgrades##http://openzaurus.org/official/unstable/3.5.1/upgrades/"
PR = "r2"
@@ -18,14 +21,52 @@ export IPKG_INSTALL = "task-bootstrap ${OPIE_LIBS_RDEPENDS} ${OPIE_BASE} ${OPIE_
${OPIE_PIM} ${OPIE_EXTRA_APPLETS} ${OPIE_EXTRA_SETTINGS} \
${OPIE_EXTRA_APPS} ${OPIE_BASE_STYLES} ${OPIE_BASE_DECOS} \
${OPIE_BASE_INPUTMETHODS}"
-
+
DEPENDS = "task-bootstrap ${OPIE_LIBS_DEPENDS} ${OPIE_BASE} ${OPIE_BASE_APPLETS} \
${OPIE_BASE_SETTINGS} ${OPIE_BASE_APPS} ${OPIE_BASE_DEPENDS} ${OPIE_PIM} \
${OPIE_EXTRA_APPLETS} ${OPIE_EXTRA_SETTINGS} ${OPIE_EXTRA_APPS} \
${OPIE_BASE_STYLES} ${OPIE_BASE_DECOS} ${OPIE_BASE_INPUTMETHODS}"
+# merge feed-sources into ipkg.conf for opie-aqpkg as it can't handle feed-sources outside of ipkg.conf.
+merge_feeds() {
+
+ # comment out existing feed-sources inserted by ipkg-collateral
+ cat ${IMAGE_ROOTFS}/etc/ipkg.conf | sed "s/^src\ /#src\ /" > ${IMAGE_ROOTFS}/etc/ipkg.conf_
+ rm ${IMAGE_ROOTFS}/etc/ipkg.conf && mv ${IMAGE_ROOTFS}/etc/ipkg.conf_ ${IMAGE_ROOTFS}/etc/ipkg.conf
+
+ # extract, then delete destinations
+ cat ${IMAGE_ROOTFS}/etc/ipkg.conf | egrep "^dest\ " > ${IMAGE_ROOTFS}/etc/ipkg.conf.dest
+ cat ${IMAGE_ROOTFS}/etc/ipkg.conf | egrep -v "^dest\ " > ${IMAGE_ROOTFS}/etc/ipkg.conf_
+ rm ${IMAGE_ROOTFS}/etc/ipkg.conf && mv ${IMAGE_ROOTFS}/etc/ipkg.conf_ ${IMAGE_ROOTFS}/etc/ipkg.conf
+
+
+ for line in ${FEED_URIS}
+ do
+ # strip leading and trailing spaces/tabs, then split into name and uri
+ line_clean="`echo "$line"|sed 's/^[ \t]*//;s/[ \t]*$//'`"
+ feed_name="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\1/p'`"
+ feed_uri="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\2/p'`"
+
+ # insert new feed-sources
+ echo "src $feed_name $feed_uri" >> ${IMAGE_ROOTFS}/etc/ipkg.conf
+ done
+
+ # remove temporary files and rebuild ipkg.conf
+ echo "" >> ${IMAGE_ROOTFS}/etc/ipkg.conf
+ cat ${IMAGE_ROOTFS}/etc/ipkg.conf.dest >> ${IMAGE_ROOTFS}/etc/ipkg.conf
+ rm ${IMAGE_ROOTFS}/etc/ipkg.conf.dest
+
+ # remove -feed.conf files which are no longer needed
+ cd ${IMAGE_ROOTFS}/etc/ipkg/ && rm -- *-feed.conf
+}
+
# zap the root password
#IMAGE_POSTPROCESS_COMMAND = "zap_root_password"
+# merge feed-sources into ipkg.conf
+IMAGE_PREPROCESS_COMMAND = "merge_feeds"
+
inherit image_ipk
+
+