diff options
author | Matthias Hentges <oe@hentges.net> | 2004-10-03 12:49:03 +0000 |
---|---|---|
committer | Matthias Hentges <oe@hentges.net> | 2004-10-03 12:49:03 +0000 |
commit | 15dd8f432557d4914e0d9076004533dc33f63e69 (patch) | |
tree | bac593fc546200fd2343da62e36d8ad4ca47e302 /classes/image_ipk.oeclass | |
parent | 6480584fcd6516525d0755e8bb2d2a6b1e0b9981 (diff) |
Change FEED_URI handling to store feeds in /etc/ipkg/*-feed.conf. Allow distribution specific feeds using FEED_URIS_openzaurus or FEED_URIS_familiar (see opie-image.oe for details). Add merge_feeds to opie-image.oe to store the feeds in ipkg.conf since aqpkg can't handle feeds in /etc/ipkg/*
BKrev: 415ff53fbd8EFTG2Ymc8STT8RUejLg
Diffstat (limited to 'classes/image_ipk.oeclass')
-rw-r--r-- | classes/image_ipk.oeclass | 43 |
1 files changed, 18 insertions, 25 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 } |