summaryrefslogtreecommitdiffstats
path: root/meta/classes/rootfs_ipk.bbclass
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2014-01-13 10:16:43 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-11 11:50:26 +0000
commitd950ef40a3eae4b54cc62828e66d84a62d78c447 (patch)
tree3c3d9ae302690799bf1197740d2bdf0243b76ed6 /meta/classes/rootfs_ipk.bbclass
parent0650e1f2354cdb6f925040d9d07e2c785274a592 (diff)
downloadopenembedded-core-d950ef40a3eae4b54cc62828e66d84a62d78c447.tar.gz
Cleanup image,rootfs_ipk,package_ipk bbclass files
This commit cleans up the functions that were ported to python. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Diffstat (limited to 'meta/classes/rootfs_ipk.bbclass')
-rw-r--r--meta/classes/rootfs_ipk.bbclass109
1 files changed, 3 insertions, 106 deletions
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index f97f027804..9d63450dd1 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -15,117 +15,14 @@ rootfs_ipk_do_rootfs[vardepsexclude] += "BUILDNAME"
do_rootfs[lockfiles] += "${WORKDIR}/ipk.lock"
-OPKG_PREPROCESS_COMMANDS = "package_update_index_ipk; package_generate_ipkg_conf"
+OPKG_PREPROCESS_COMMANDS = ""
-OPKG_POSTPROCESS_COMMANDS = "ipk_insert_feed_uris; "
+OPKG_POSTPROCESS_COMMANDS = ""
OPKGLIBDIR = "${localstatedir}/lib"
MULTILIBRE_ALLOW_REP = "${OPKGLIBDIR}/opkg"
-fakeroot rootfs_ipk_do_rootfs () {
- #set -x
-
- rm -f ${IPKGCONF_TARGET}
- touch ${IPKGCONF_TARGET}
-
- ${OPKG_PREPROCESS_COMMANDS}
-
- mkdir -p ${T}/
-
- export INSTALL_CONF_IPK="${IPKGCONF_TARGET}"
- export INSTALL_ROOTFS_IPK="${IMAGE_ROOTFS}"
- STATUS=${IMAGE_ROOTFS}${OPKGLIBDIR}/opkg/status
- mkdir -p ${IMAGE_ROOTFS}${OPKGLIBDIR}/opkg
-
- opkg-cl ${OPKG_ARGS} update
-
- # prime the status file with bits that we don't want
- for i in ${BAD_RECOMMENDATIONS}; do
- pkginfo="`opkg-cl ${OPKG_ARGS} info $i`"
- if [ ! -z "$pkginfo" ]; then
- echo "$pkginfo" | awk "/^Status:/ { print \"Status: deinstall hold not-installed\n\" }" - >> $STATUS
- else
- echo "Requested ignored recommendation $i is not a package"
- fi
- done
-
- #install
- export INSTALL_PACKAGES_ATTEMPTONLY_IPK="${PACKAGE_INSTALL_ATTEMPTONLY}"
- export INSTALL_PACKAGES_LINGUAS_IPK="${LINGUAS_INSTALL}"
- export INSTALL_TASK_IPK="rootfs"
-
-
- export INSTALL_PACKAGES_IPK="${PACKAGE_INSTALL}"
-
- #post install
- export D=${IMAGE_ROOTFS}
- export OFFLINE_ROOT=${IMAGE_ROOTFS}
- export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS}
- export OPKG_OFFLINE_ROOT=${IPKG_OFFLINE_ROOT}
- export INTERCEPT_DIR=${WORKDIR}/intercept_scripts
- export NATIVE_ROOT=${STAGING_DIR_NATIVE}
-
- package_install_internal_ipk
-
- # Distro specific packages should create this
- #mkdir -p ${IMAGE_ROOTFS}/etc/opkg/
- #grep "^arch" ${IPKGCONF_TARGET} >${IMAGE_ROOTFS}/etc/opkg/arch.conf
-
- rootfs_install_complementary
-
- ${OPKG_POSTPROCESS_COMMANDS}
- ${ROOTFS_POSTINSTALL_COMMAND}
-
- install -d ${IMAGE_ROOTFS}/${sysconfdir}
- echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version
-
- ${ROOTFS_POSTPROCESS_COMMAND}
-
- if ${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "true", "false" ,d)}; then
- delayed_postinsts="$(delayed_postinsts)"
- if [ -n "$delayed_postinsts" ]; then
- bberror "The following packages could not be configured offline and rootfs is read-only: $delayed_postinsts"
- exit 1
- fi
- fi
-
- rm -f ${IMAGE_ROOTFS}${OPKGLIBDIR}/opkg/lists/*
- log_check rootfs
-}
-
-rootfs_ipk_do_rootfs[vardeps] += "delayed_postinsts"
-
-delayed_postinsts () {
- cat ${STATUS}|grep -e "^Package:" -e "^Status:"|sed -ne 'N;s/Package: \(.*\)\nStatus:.*unpacked/\1/p'
-}
-
-save_postinsts () {
- # Scripts need to be ordered when executed, this ensures numeric order
- # If we ever run into needing more the 899 scripts, we'll have to
- # change num to start with 1000.
- num=100
- for p in $(delayed_postinsts); do
- install -d ${IMAGE_ROOTFS}${sysconfdir}/ipk-postinsts
- cp ${IMAGE_ROOTFS}${OPKGLIBDIR}/opkg/info/$p.postinst ${IMAGE_ROOTFS}${sysconfdir}/ipk-postinsts/$num-$p
- num=`echo \$((num+1))`
- done
-}
-
-remove_packaging_data_files() {
- rm -rf ${IMAGE_ROOTFS}${OPKGLIBDIR}/opkg
- # We need the directory for the package manager lock
- mkdir ${IMAGE_ROOTFS}${OPKGLIBDIR}/opkg
-}
-
-rootfs_install_packages() {
- opkg-cl ${OPKG_ARGS} install `cat $1`
-}
-
-rootfs_uninstall_packages() {
- opkg-cl ${OPKG_ARGS} --force-depends remove $@
-}
-
ipk_insert_feed_uris () {
echo "Building from feeds activated!"
@@ -163,7 +60,7 @@ python () {
flags = flags.replace("do_deploy", "")
flags = flags.replace("do_populate_sysroot", "")
d.setVarFlag('do_rootfs', 'recrdeptask', flags)
- d.setVar('OPKG_PREPROCESS_COMMANDS', "package_generate_archlist\nipk_insert_feed_uris")
+ d.setVar('OPKG_PREPROCESS_COMMANDS', "ipk_insert_feed_uris")
d.setVar('OPKG_POSTPROCESS_COMMANDS', '')
}