summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openedhand.com>2008-10-07 16:21:25 +0000
committerMarcin Juszkiewicz <hrw@openedhand.com>2008-10-07 16:21:25 +0000
commit0ea7472583fdcb7caa90907cb2cc3cb3874f2319 (patch)
treee34b5425ba81aa7b7a8c309d6d5663afa763b2e9 /meta
parentd1a327beded59df0aaf2b1859ebee017862d763c (diff)
downloadopenembedded-core-0ea7472583fdcb7caa90907cb2cc3cb3874f2319.tar.gz
openembedded-core-0ea7472583fdcb7caa90907cb2cc3cb3874f2319.tar.bz2
openembedded-core-0ea7472583fdcb7caa90907cb2cc3cb3874f2319.zip
rootfs_rpm.bbclass: added generation of feed entries
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5434 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/rootfs_rpm.bbclass26
1 files changed, 26 insertions, 0 deletions
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index e331cf5b48..292e3bb60d 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -15,6 +15,31 @@ export YUM_ARCH_FORCE = "${TARGET_ARCH}"
AWKPOSTINSTSCRIPT = "${STAGING_BINDIR_NATIVE}/extract-postinst.awk"
+RPM_POSTPROCESS_COMMANDS = "rpm_insert_feeds_uris"
+
+rpm_insert_feeds_uris () {
+
+ echo "Building from feeds activated!"
+
+ mkdir -p ${IMAGE_ROOTFS}/etc/yum/repos.d/
+ for line in ${RPM_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'`"
+
+ echo "Added $feed_name feed with URL $feed_uri"
+
+ FEED_FILE=${IMAGE_ROOTFS}/etc/yum/repos.d/$feed_name
+
+ echo "[poky-feed-$feed_name]" >> $FEED_FILE
+ echo "name = $feed_name" >> $FEED_FILE
+ echo "baseurl = $feed_uri" >> $FEED_FILE
+ echo "gpgcheck = 0" >> $FEED_FILE
+ done
+}
+
fakeroot rootfs_rpm_do_rootfs () {
set -x
@@ -134,6 +159,7 @@ EOF
install -d ${IMAGE_ROOTFS}/${sysconfdir}
echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version
+ ${RPM_POSTPROCESS_COMMANDS}
${ROOTFS_POSTPROCESS_COMMAND}
rm -rf ${IMAGE_ROOTFS}/var/cache2/