diff options
author | Michael Lauer <mickey@vanille-media.de> | 2004-10-03 01:11:44 +0000 |
---|---|---|
committer | Michael Lauer <mickey@vanille-media.de> | 2004-10-03 01:11:44 +0000 |
commit | fdd3150b77df034ab19bb0af3df33341a9513de0 (patch) | |
tree | ee5d4cfbc19f49639564f73ce092175f37161faa /classes/image_ipk.oeclass | |
parent | b217e4b81162823e8dce53f396c2263e698b867a (diff) |
Merge bk://openembedded@openembedded.bkbits.net/packages
into gandalf.tm.informatik.uni-frankfurt.de:/local/pkg/oe/packages
2004/10/02 21:59:00+02:00 local!CoreDump
Merge bk://openembedded@openembedded.bkbits.net/packages
into mhcln01.hentges.local:/home/mhentges/OpenEmbedded/packages
2004/10/02 21:58:26+02:00 local!CoreDump
Add support for defining feed-URLs in *-image.oe files by setting FEED_URIS. The URLs will then be included as sources in ipkg.conf. See opie-image.oe for an example.
BKrev: 415f51d0CQqj8c3kxPUCSzuR6GctAw
Diffstat (limited to 'classes/image_ipk.oeclass')
-rw-r--r-- | classes/image_ipk.oeclass | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/classes/image_ipk.oeclass b/classes/image_ipk.oeclass index 6d6a2b22e2..6c741b9cf3 100644 --- a/classes/image_ipk.oeclass +++ b/classes/image_ipk.oeclass @@ -31,6 +31,8 @@ fakeroot do_rootfs () { real_do_rootfs + insert_feed_uris + export TOPDIR=${TOPDIR} for type in ${IMAGE_FSTYPES}; do @@ -43,3 +45,37 @@ fakeroot do_rootfs () { ${IMAGE_POSTPROCESS_COMMAND} } + +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 + + + 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 + + cp ${IMAGE_ROOTFS}/etc/ipkg.conf ${WORKDIR} +} |