1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-09 17:39:31 +00:00

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
This commit is contained in:
Richard Purdie
2008-09-03 23:22:06 +00:00
parent a6f3e46936
commit 8821664fad
+17 -15
View File
@@ -12,6 +12,8 @@ do_rootfs[recrdeptask] += "do_package_write_rpm"
YUMCONF = "${IMAGE_ROOTFS}/etc/yum.conf" YUMCONF = "${IMAGE_ROOTFS}/etc/yum.conf"
YUMARGS = "-c ${YUMCONF} --installroot ${IMAGE_ROOTFS}" YUMARGS = "-c ${YUMCONF} --installroot ${IMAGE_ROOTFS}"
AWKPOSTINSTSCRIPT = "${STAGING_BINDIR_NATIVE}/extract-postinst.awk"
fakeroot rootfs_rpm_do_rootfs () { fakeroot rootfs_rpm_do_rootfs () {
set -x set -x
@@ -67,26 +69,26 @@ EOF
fakechroot yum ${YUMARGS} -y install ${PACKAGE_INSTALL} fakechroot yum ${YUMARGS} -y install ${PACKAGE_INSTALL}
fi fi
#export D=${IMAGE_ROOTFS} export D=${IMAGE_ROOTFS}
#export OFFLINE_ROOT=${IMAGE_ROOTFS} export OFFLINE_ROOT=${IMAGE_ROOTFS}
#export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS} export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS}
#export OPKG_OFFLINE_ROOT=${IPKG_OFFLINE_ROOT} export OPKG_OFFLINE_ROOT=${IMAGE_ROOTFS}
#mkdir -p ${IMAGE_ROOTFS}/etc/opkg/ #mkdir -p ${IMAGE_ROOTFS}/etc/opkg/
#grep "^arch" ${IPKGCONF_TARGET} >${IMAGE_ROOTFS}/etc/opkg/arch.conf #grep "^arch" ${IPKGCONF_TARGET} >${IMAGE_ROOTFS}/etc/opkg/arch.conf
${ROOTFS_POSTINSTALL_COMMAND} ${ROOTFS_POSTINSTALL_COMMAND}
#for i in ${IMAGE_ROOTFS}${libdir}/opkg/info/*.preinst; do mkdir -p ${IMAGE_ROOTFS}/etc/rpm-postinsts/
# if [ -f $i ] && ! sh $i; then rpm --root ${IMAGE_ROOTFS} -aq --queryformat 'Name: %{NAME}\n' --scripts > ${IMAGE_ROOTFS}/etc/rpm-postinsts/combined
# opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .preinst` awk -f ${AWKPOSTINSTSCRIPT} < ${IMAGE_ROOTFS}/etc/rpm-postinsts/combined
# fi rm ${IMAGE_ROOTFS}/etc/rpm-postinsts/combined
#done
#for i in ${IMAGE_ROOTFS}${libdir}/opkg/info/*.postinst; do for i in ${IMAGE_ROOTFS}/etc/rpm-postinsts/*.sh; do
# if [ -f $i ] && ! sh $i configure; then if [ -f $i ] && sh $i; then
# opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .postinst` rm $i
# fi fi
#done done
install -d ${IMAGE_ROOTFS}/${sysconfdir} install -d ${IMAGE_ROOTFS}/${sysconfdir}
echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version