summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/packaged-staging.bbclass14
-rw-r--r--meta/classes/rootfs_rpm.bbclass36
2 files changed, 36 insertions, 14 deletions
diff --git a/meta/classes/packaged-staging.bbclass b/meta/classes/packaged-staging.bbclass
index 4c468b8c7..a7dd1f80c 100644
--- a/meta/classes/packaged-staging.bbclass
+++ b/meta/classes/packaged-staging.bbclass
@@ -361,6 +361,8 @@ python do_package_stage () {
ipkpath = bb.data.getVar('DEPLOY_DIR_IPK', d, True).replace(tmpdir, stagepath)
if bb.data.inherits_class('package_deb', d):
debpath = bb.data.getVar('DEPLOY_DIR_DEB', d, True).replace(tmpdir, stagepath)
+ if bb.data.inherits_class('package_rpm', d):
+ rpmpath = bb.data.getVar('DEPLOY_DIR_RPM', d, True).replace(tmpdir, stagepath)
for pkg in packages:
pkgname = bb.data.getVar('PKG_%s' % pkg, d, 1)
@@ -393,6 +395,18 @@ python do_package_stage () {
bb.mkdirhier(destpath)
bb.copyfile(srcfile, destpath + srcname)
+ if bb.data.inherits_class('package_rpm', d):
+ version = bb.data.getVar('PV', d, 1)
+ version = version.replace('-', '+')
+ bb.data.setVar('RPMPV', version, d)
+ srcname = bb.data.expand(pkgname + "-${RPMPV}-" + pr + ".${TARGET_ARCH}.rpm", d)
+ srcfile = bb.data.expand("${DEPLOY_DIR_RPM}/" + arch + "/" + srcname, d)
+ if os.path.exists(srcfile):
+ destpath = rpmpath + "/" + arch + "/"
+ bb.mkdirhier(destpath)
+ bb.copyfile(srcfile, destpath + srcname)
+
+
#
# Handle stamps/ files
#
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 533efb09b..2d5f51af0 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -17,18 +17,9 @@ AWKPOSTINSTSCRIPT = "${STAGING_BINDIR_NATIVE}/extract-postinst.awk"
fakeroot rootfs_rpm_do_rootfs () {
set -x
- # Update the repository index
- createrepo ${DEPLOY_DIR_RPM}
-
mkdir -p ${IMAGE_ROOTFS}/etc/rpm/
#echo "arm" > ${IMAGE_ROOTFS}/etc/rpm/platform
- # Copy the packages into the target image
- # Ugly ugly ugly but rpm is braindead and can't see outside the chroot
- # when installing :(
- mkdir -p ${IMAGE_ROOTFS}${DEPLOY_DIR_RPM}
- cp -r ${DEPLOY_DIR_RPM}/* ${IMAGE_ROOTFS}${DEPLOY_DIR_RPM}/
-
# Generate an apprpriate yum.conf
rm -rf ${YUMCONF}
cat > ${YUMCONF} << EOF
@@ -43,12 +34,29 @@ tolerant=1
arch=arm
basearch=arm
-[poky-feed]
-name = Poky RPM Feed
-baseurl=file://${DEPLOY_DIR_RPM}
-gpgcheck=0
-
EOF
+
+ #priority=1
+ for arch in ${PACKAGE_ARCHS}; do
+ if [ ! -d ${DEPLOY_DIR_RPM}/$arch ]; then
+ continue;
+ fi
+ createrepo ${DEPLOY_DIR_RPM}/$arch
+
+ echo "[poky-feed-$arch]" >> ${YUMCONF}
+ echo "name = Poky RPM $arch Feed" >> ${YUMCONF}
+ echo "baseurl=file://${DEPLOY_DIR_RPM}/$arch" >> ${YUMCONF}
+ echo "gpgcheck=0" >> ${YUMCONF}
+ echo "" >> ${YUMCONF}
+ #priority=$(expr $priority + 5)
+ done
+
+ # Copy the packages into the target image
+ # Ugly ugly ugly but rpm is braindead and can't see outside the chroot
+ # when installing :(
+ mkdir -p ${IMAGE_ROOTFS}${DEPLOY_DIR_RPM}
+ cp -r ${DEPLOY_DIR_RPM}/* ${IMAGE_ROOTFS}${DEPLOY_DIR_RPM}/
+
#mkdir -p ${IMAGE_ROOTFS}/var/lib/rpm
#rpm --root ${IMAGE_ROOTFS} --initdb
#rpm --root ${IMAGE_ROOTFS} --dbpath ${IMAGE_ROOTFS}/var/lib/rpm -ihv --nodeps --ignoreos