summaryrefslogtreecommitdiffstats
path: root/meta/classes/rootfs_rpm.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-09-03 23:22:06 +0000
committerRichard Purdie <richard@openedhand.com>2008-09-03 23:22:06 +0000
commit8821664fad09d2dac1bcb93f7281faaa1fefebda (patch)
treed6d948eb294be2416781b8657fed4474d8c93eaf /meta/classes/rootfs_rpm.bbclass
parenta6f3e46936b913032ead27dd67e6fe03f03cd36c (diff)
downloadpoky-8821664fad09d2dac1bcb93f7281faaa1fefebda.tar.gz
rootfs_rpm.bbclass: Add basic postinstall handling during image creation
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5134 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/classes/rootfs_rpm.bbclass')
-rw-r--r--meta/classes/rootfs_rpm.bbclass32
1 files changed, 17 insertions, 15 deletions
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 7e439f3a58..6339a21476 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -12,6 +12,8 @@ do_rootfs[recrdeptask] += "do_package_write_rpm"
12YUMCONF = "${IMAGE_ROOTFS}/etc/yum.conf" 12YUMCONF = "${IMAGE_ROOTFS}/etc/yum.conf"
13YUMARGS = "-c ${YUMCONF} --installroot ${IMAGE_ROOTFS}" 13YUMARGS = "-c ${YUMCONF} --installroot ${IMAGE_ROOTFS}"
14 14
15AWKPOSTINSTSCRIPT = "${STAGING_BINDIR_NATIVE}/extract-postinst.awk"
16
15fakeroot rootfs_rpm_do_rootfs () { 17fakeroot rootfs_rpm_do_rootfs () {
16 set -x 18 set -x
17 19
@@ -67,26 +69,26 @@ EOF
67 fakechroot yum ${YUMARGS} -y install ${PACKAGE_INSTALL} 69 fakechroot yum ${YUMARGS} -y install ${PACKAGE_INSTALL}
68 fi 70 fi
69 71
70 #export D=${IMAGE_ROOTFS} 72 export D=${IMAGE_ROOTFS}
71 #export OFFLINE_ROOT=${IMAGE_ROOTFS} 73 export OFFLINE_ROOT=${IMAGE_ROOTFS}
72 #export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS} 74 export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS}
73 #export OPKG_OFFLINE_ROOT=${IPKG_OFFLINE_ROOT} 75 export OPKG_OFFLINE_ROOT=${IMAGE_ROOTFS}
74 76
75 #mkdir -p ${IMAGE_ROOTFS}/etc/opkg/ 77 #mkdir -p ${IMAGE_ROOTFS}/etc/opkg/
76 #grep "^arch" ${IPKGCONF_TARGET} >${IMAGE_ROOTFS}/etc/opkg/arch.conf 78 #grep "^arch" ${IPKGCONF_TARGET} >${IMAGE_ROOTFS}/etc/opkg/arch.conf
77 79
78 ${ROOTFS_POSTINSTALL_COMMAND} 80 ${ROOTFS_POSTINSTALL_COMMAND}
79 81
80 #for i in ${IMAGE_ROOTFS}${libdir}/opkg/info/*.preinst; do 82 mkdir -p ${IMAGE_ROOTFS}/etc/rpm-postinsts/
81 # if [ -f $i ] && ! sh $i; then 83 rpm --root ${IMAGE_ROOTFS} -aq --queryformat 'Name: %{NAME}\n' --scripts > ${IMAGE_ROOTFS}/etc/rpm-postinsts/combined
82 # opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .preinst` 84 awk -f ${AWKPOSTINSTSCRIPT} < ${IMAGE_ROOTFS}/etc/rpm-postinsts/combined
83 # fi 85 rm ${IMAGE_ROOTFS}/etc/rpm-postinsts/combined
84 #done 86
85 #for i in ${IMAGE_ROOTFS}${libdir}/opkg/info/*.postinst; do 87 for i in ${IMAGE_ROOTFS}/etc/rpm-postinsts/*.sh; do
86 # if [ -f $i ] && ! sh $i configure; then 88 if [ -f $i ] && sh $i; then
87 # opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .postinst` 89 rm $i
88 # fi 90 fi
89 #done 91 done
90 92
91 install -d ${IMAGE_ROOTFS}/${sysconfdir} 93 install -d ${IMAGE_ROOTFS}/${sysconfdir}
92 echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version 94 echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version