summaryrefslogtreecommitdiffstats
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 4c468b8c77..a7dd1f80c1 100644
--- a/meta/classes/packaged-staging.bbclass
+++ b/meta/classes/packaged-staging.bbclass
@@ -361,6 +361,8 @@ python do_package_stage () {
361 ipkpath = bb.data.getVar('DEPLOY_DIR_IPK', d, True).replace(tmpdir, stagepath) 361 ipkpath = bb.data.getVar('DEPLOY_DIR_IPK', d, True).replace(tmpdir, stagepath)
362 if bb.data.inherits_class('package_deb', d): 362 if bb.data.inherits_class('package_deb', d):
363 debpath = bb.data.getVar('DEPLOY_DIR_DEB', d, True).replace(tmpdir, stagepath) 363 debpath = bb.data.getVar('DEPLOY_DIR_DEB', d, True).replace(tmpdir, stagepath)
364 if bb.data.inherits_class('package_rpm', d):
365 rpmpath = bb.data.getVar('DEPLOY_DIR_RPM', d, True).replace(tmpdir, stagepath)
364 366
365 for pkg in packages: 367 for pkg in packages:
366 pkgname = bb.data.getVar('PKG_%s' % pkg, d, 1) 368 pkgname = bb.data.getVar('PKG_%s' % pkg, d, 1)
@@ -393,6 +395,18 @@ python do_package_stage () {
393 bb.mkdirhier(destpath) 395 bb.mkdirhier(destpath)
394 bb.copyfile(srcfile, destpath + srcname) 396 bb.copyfile(srcfile, destpath + srcname)
395 397
398 if bb.data.inherits_class('package_rpm', d):
399 version = bb.data.getVar('PV', d, 1)
400 version = version.replace('-', '+')
401 bb.data.setVar('RPMPV', version, d)
402 srcname = bb.data.expand(pkgname + "-${RPMPV}-" + pr + ".${TARGET_ARCH}.rpm", d)
403 srcfile = bb.data.expand("${DEPLOY_DIR_RPM}/" + arch + "/" + srcname, d)
404 if os.path.exists(srcfile):
405 destpath = rpmpath + "/" + arch + "/"
406 bb.mkdirhier(destpath)
407 bb.copyfile(srcfile, destpath + srcname)
408
409
396 # 410 #
397 # Handle stamps/ files 411 # Handle stamps/ files
398 # 412 #
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 533efb09b8..2d5f51af04 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -17,18 +17,9 @@ AWKPOSTINSTSCRIPT = "${STAGING_BINDIR_NATIVE}/extract-postinst.awk"
17fakeroot rootfs_rpm_do_rootfs () { 17fakeroot rootfs_rpm_do_rootfs () {
18 set -x 18 set -x
19 19
20 # Update the repository index
21 createrepo ${DEPLOY_DIR_RPM}
22
23 mkdir -p ${IMAGE_ROOTFS}/etc/rpm/ 20 mkdir -p ${IMAGE_ROOTFS}/etc/rpm/
24 #echo "arm" > ${IMAGE_ROOTFS}/etc/rpm/platform 21 #echo "arm" > ${IMAGE_ROOTFS}/etc/rpm/platform
25 22
26 # Copy the packages into the target image
27 # Ugly ugly ugly but rpm is braindead and can't see outside the chroot
28 # when installing :(
29 mkdir -p ${IMAGE_ROOTFS}${DEPLOY_DIR_RPM}
30 cp -r ${DEPLOY_DIR_RPM}/* ${IMAGE_ROOTFS}${DEPLOY_DIR_RPM}/
31
32 # Generate an apprpriate yum.conf 23 # Generate an apprpriate yum.conf
33 rm -rf ${YUMCONF} 24 rm -rf ${YUMCONF}
34 cat > ${YUMCONF} << EOF 25 cat > ${YUMCONF} << EOF
@@ -43,12 +34,29 @@ tolerant=1
43arch=arm 34arch=arm
44basearch=arm 35basearch=arm
45 36
46[poky-feed]
47name = Poky RPM Feed
48baseurl=file://${DEPLOY_DIR_RPM}
49gpgcheck=0
50
51EOF 37EOF
38
39 #priority=1
40 for arch in ${PACKAGE_ARCHS}; do
41 if [ ! -d ${DEPLOY_DIR_RPM}/$arch ]; then
42 continue;
43 fi
44 createrepo ${DEPLOY_DIR_RPM}/$arch
45
46 echo "[poky-feed-$arch]" >> ${YUMCONF}
47 echo "name = Poky RPM $arch Feed" >> ${YUMCONF}
48 echo "baseurl=file://${DEPLOY_DIR_RPM}/$arch" >> ${YUMCONF}
49 echo "gpgcheck=0" >> ${YUMCONF}
50 echo "" >> ${YUMCONF}
51 #priority=$(expr $priority + 5)
52 done
53
54 # Copy the packages into the target image
55 # Ugly ugly ugly but rpm is braindead and can't see outside the chroot
56 # when installing :(
57 mkdir -p ${IMAGE_ROOTFS}${DEPLOY_DIR_RPM}
58 cp -r ${DEPLOY_DIR_RPM}/* ${IMAGE_ROOTFS}${DEPLOY_DIR_RPM}/
59
52 #mkdir -p ${IMAGE_ROOTFS}/var/lib/rpm 60 #mkdir -p ${IMAGE_ROOTFS}/var/lib/rpm
53 #rpm --root ${IMAGE_ROOTFS} --initdb 61 #rpm --root ${IMAGE_ROOTFS} --initdb
54 #rpm --root ${IMAGE_ROOTFS} --dbpath ${IMAGE_ROOTFS}/var/lib/rpm -ihv --nodeps --ignoreos 62 #rpm --root ${IMAGE_ROOTFS} --dbpath ${IMAGE_ROOTFS}/var/lib/rpm -ihv --nodeps --ignoreos