diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/rootfs_deb.bbclass | 12 | ||||
-rw-r--r-- | meta/classes/rootfs_ipk.bbclass | 18 | ||||
-rw-r--r-- | meta/classes/rootfs_rpm.bbclass | 6 |
3 files changed, 21 insertions, 15 deletions
diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass index 16b8a86a58..b33d153dae 100644 --- a/meta/classes/rootfs_deb.bbclass +++ b/meta/classes/rootfs_deb.bbclass @@ -8,6 +8,8 @@ ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts" do_rootfs[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot" do_rootfs[recrdeptask] += "do_package_write_deb" +opkglibdir = "${localstatedir}/lib/opkg" + fakeroot rootfs_deb_do_rootfs () { set +e mkdir -p ${IMAGE_ROOTFS}/var/dpkg/info @@ -120,13 +122,13 @@ fakeroot rootfs_deb_do_rootfs () { set -e # Hacks to allow opkg's update-alternatives and opkg to coexist for now - mkdir -p ${IMAGE_ROOTFS}/usr/lib/opkg + mkdir -p ${IMAGE_ROOTFS}${opkglibdir} if [ -e ${IMAGE_ROOTFS}/var/dpkg/alternatives ]; then rmdir ${IMAGE_ROOTFS}/var/dpkg/alternatives fi - ln -s /usr/lib/opkg/alternatives ${IMAGE_ROOTFS}/var/dpkg/alternatives - ln -s /var/dpkg/info ${IMAGE_ROOTFS}/usr/lib/opkg/info - ln -s /var/dpkg/status ${IMAGE_ROOTFS}/usr/lib/opkg/status + ln -s ${opkglibdir}/alternatives ${IMAGE_ROOTFS}/var/dpkg/alternatives + ln -s /var/dpkg/info ${IMAGE_ROOTFS}${opkglibdir}/info + ln -s /var/dpkg/status ${IMAGE_ROOTFS}${opkglibdir}/status ${ROOTFS_POSTPROCESS_COMMAND} @@ -154,6 +156,6 @@ rootfs_deb_log_check() { } remove_packaging_data_files() { - rm -rf ${IMAGE_ROOTFS}/usr/lib/opkg/ + rm -rf ${IMAGE_ROOTFS}${opkglibdir} rm -rf ${IMAGE_ROOTFS}/usr/dpkg/ } diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass index 0bfa49194d..c9edec2b52 100644 --- a/meta/classes/rootfs_ipk.bbclass +++ b/meta/classes/rootfs_ipk.bbclass @@ -18,6 +18,8 @@ OPKG_PREPROCESS_COMMANDS = "package_update_index_ipk; package_generate_ipkg_conf OPKG_POSTPROCESS_COMMANDS = "ipk_insert_feed_uris" +opkglibdir = "${localstatedir}/lib/opkg" + fakeroot rootfs_ipk_do_rootfs () { set -x @@ -27,7 +29,7 @@ fakeroot rootfs_ipk_do_rootfs () { ${OPKG_PREPROCESS_COMMANDS} mkdir -p ${T}/ - mkdir -p ${IMAGE_ROOTFS}/usr/lib/opkg/ + mkdir -p ${IMAGE_ROOTFS}${opkglibdir} opkg-cl ${IPKG_ARGS} update @@ -59,12 +61,12 @@ fakeroot rootfs_ipk_do_rootfs () { ${OPKG_POSTPROCESS_COMMANDS} ${ROOTFS_POSTINSTALL_COMMAND} - for i in ${IMAGE_ROOTFS}${libdir}/opkg/info/*.preinst; do + for i in ${IMAGE_ROOTFS}${opkglibdir}/info/*.preinst; do if [ -f $i ] && ! sh $i; then opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .preinst` fi done - for i in ${IMAGE_ROOTFS}${libdir}/opkg/info/*.postinst; do + for i in ${IMAGE_ROOTFS}${opkglibdir}/info/*.postinst; do if [ -f $i ] && ! sh $i configure; then opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .postinst` fi @@ -75,7 +77,7 @@ fakeroot rootfs_ipk_do_rootfs () { ${ROOTFS_POSTPROCESS_COMMAND} - rm -f ${IMAGE_ROOTFS}${libdir}/opkg/lists/* + rm -f ${IMAGE_ROOTFS}${opkglibdir}/lists/* log_check rootfs } @@ -102,7 +104,7 @@ rootfs_ipk_log_check() { rootfs_ipk_write_manifest() { manifest=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest - cp ${IMAGE_ROOTFS}/usr/lib/opkg/status $manifest + cp ${IMAGE_ROOTFS}${opkglibdir}/status $manifest sed '/Depends/d' -i $manifest sed '/Status/d' -i $manifest @@ -115,16 +117,16 @@ rootfs_ipk_write_manifest() { } remove_packaging_data_files() { - rm -rf ${IMAGE_ROOTFS}/usr/lib/opkg/ + rm -rf ${IMAGE_ROOTFS}${opkglibdir} # We need the directory for the package manager lock - mkdir ${IMAGE_ROOTFS}/usr/lib/opkg + mkdir ${IMAGE_ROOTFS}${opkglibdir} } install_all_locales() { PACKAGES_TO_INSTALL="" - INSTALLED_PACKAGES=`grep ^Package: ${IMAGE_ROOTFS}${libdir}/opkg/status |sed "s/^Package: //"|egrep -v -- "(-locale-|-dev$|-doc$|^kernel|^glibc|^ttf|^task|^perl|^python)"` + INSTALLED_PACKAGES=`grep ^Package: ${IMAGE_ROOTFS}${opkglibdir}/status |sed "s/^Package: //"|egrep -v -- "(-locale-|-dev$|-doc$|^kernel|^glibc|^ttf|^task|^perl|^python)"` for pkg in $INSTALLED_PACKAGES do diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass index 9c681f382b..9cbfdd3db3 100644 --- a/meta/classes/rootfs_rpm.bbclass +++ b/meta/classes/rootfs_rpm.bbclass @@ -20,6 +20,8 @@ AWKPOSTINSTSCRIPT = "${POKYBASE}/scripts/rootfs_rpm-extract-postinst.awk" RPM_PREPROCESS_COMMANDS = "package_update_index_rpm; package_generate_rpm_conf" RPM_POSTPROCESS_COMMANDS = "" +opkglibdir = "${localstatedir}/lib/opkg" + fakeroot rootfs_rpm_do_rootfs () { set +x @@ -164,7 +166,7 @@ rootfs_rpm_log_check() { remove_packaging_data_files() { exit 1 - rm -rf ${IMAGE_ROOTFS}/usr/lib/opkg/ + rm -rf ${IMAGE_ROOTFS}${opkglibdir} } install_all_locales() { @@ -172,7 +174,7 @@ install_all_locales() { PACKAGES_TO_INSTALL="" - INSTALLED_PACKAGES=`grep ^Package: ${IMAGE_ROOTFS}${libdir}/opkg/status |sed "s/^Package: //"|egrep -v -- "(-locale-|-dev$|-doc$|^kernel|^glibc|^ttf|^task|^perl|^python)"` + INSTALLED_PACKAGES=`grep ^Package: ${IMAGE_ROOTFS}${opkglibdir}/status |sed "s/^Package: //"|egrep -v -- "(-locale-|-dev$|-doc$|^kernel|^glibc|^ttf|^task|^perl|^python)"` for pkg in $INSTALLED_PACKAGES do |