summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_deb.bbclass
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2013-12-18 18:02:18 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-11 11:50:25 +0000
commita83144bac8d67704ff66f5dc0fc56f5b63979694 (patch)
tree5b11e346951517ca28f8c3ef5980100cfaf29a57 /meta/classes/package_deb.bbclass
parent5ad8c21bc7f2213d1287cecf07d00a61d1456ff7 (diff)
downloadopenembedded-core-contrib-a83144bac8d67704ff66f5dc0fc56f5b63979694.tar.gz
Activate the new python rootfs/image creation routines
This commit will: * remove old bash code common to all backends; * create a new do_rootfs() python function that will use the new rootfs/image creation routines; * allow creation of dpkg based images; * fail for rpm/opkg (not implemented yet); Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Diffstat (limited to 'meta/classes/package_deb.bbclass')
-rw-r--r--meta/classes/package_deb.bbclass146
1 files changed, 0 insertions, 146 deletions
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 5d316aa8b2..bf9739e099 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -15,38 +15,6 @@ APTCONF_TARGET = "${WORKDIR}"
APT_ARGS = "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS", True) == "1"]}"
#
-# Update the Packages index files in ${DEPLOY_DIR_DEB}
-#
-package_update_index_deb () {
-
- local debarchs=""
-
- if [ ! -z "${DEPLOY_KEEP_PACKAGES}" ]; then
- return
- fi
-
- for arch in ${PACKAGE_ARCHS} ${SDK_PACKAGE_ARCHS}; do
- if [ -e ${DEPLOY_DIR_DEB}/$arch ]; then
- debarchs="$debarchs $arch"
- fi
- done
-
- found=0
- for arch in $debarchs; do
- if [ ! -d ${DEPLOY_DIR_DEB}/$arch ]; then
- continue;
- fi
- cd ${DEPLOY_DIR_DEB}/$arch
- dpkg-scanpackages . | gzip > Packages.gz
- echo "Label: $arch" > Release
- found=1
- done
- if [ "$found" != "1" ]; then
- bbfatal "There are no packages in ${DEPLOY_DIR_DEB}!"
- fi
-}
-
-#
# install a bunch of packages using apt
# the following shell variables needs to be set before calling this func:
# INSTALL_ROOTFS_DEB - install root dir
@@ -57,120 +25,6 @@ package_update_index_deb () {
# INSTALL_PACKAGES_LINGUAS_DEB - additional packages for uclibc
# INSTALL_TASK_DEB - task name
-package_install_internal_deb () {
-
- local target_rootfs="${INSTALL_ROOTFS_DEB}"
- local dpkg_arch="${INSTALL_BASEARCH_DEB}"
- local archs="${INSTALL_ARCHS_DEB}"
- local package_to_install="${INSTALL_PACKAGES_NORMAL_DEB}"
- local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_DEB}"
- local package_linguas="${INSTALL_PACKAGES_LINGUAS_DEB}"
- local task="${INSTALL_TASK_DEB}"
-
- mkdir -p ${APTCONF_TARGET}/apt
- rm -f ${APTCONF_TARGET}/apt/sources.list.rev
- rm -f ${APTCONF_TARGET}/apt/preferences
-
- priority=1
- for arch in $archs; do
- if [ ! -d ${DEPLOY_DIR_DEB}/$arch ]; then
- continue;
- fi
-
- echo "deb file:${DEPLOY_DIR_DEB}/$arch/ ./" >> ${APTCONF_TARGET}/apt/sources.list.rev
- (echo "Package: *"
- echo "Pin: release l=$arch"
- echo "Pin-Priority: $(expr 800 + $priority)"
- echo) >> ${APTCONF_TARGET}/apt/preferences
- priority=$(expr $priority + 5)
- done
-
- for pkg in ${PACKAGE_EXCLUDE}; do
- (echo "Package: $pkg"
- echo "Pin: release *"
- echo "Pin-Priority: -1"
- echo) >> ${APTCONF_TARGET}/apt/preferences
- done
-
- tac ${APTCONF_TARGET}/apt/sources.list.rev > ${APTCONF_TARGET}/apt/sources.list
-
- # The params in deb package control don't allow character `_', so
- # change the arch's `_' to `-' in it.
- dpkg_arch=`echo ${dpkg_arch} | sed 's/_/-/g'`
- cat "${STAGING_ETCDIR_NATIVE}/apt/apt.conf.sample" \
- | sed -e "s#Architecture \".*\";#Architecture \"${dpkg_arch}\";#" \
- | sed -e "s:#ROOTFS#:${target_rootfs}:g" \
- | sed -e "s:#APTCONF#:${APTCONF_TARGET}/apt:g" \
- > "${APTCONF_TARGET}/apt/apt.conf"
-
- export APT_CONFIG="${APTCONF_TARGET}/apt/apt.conf"
-
- mkdir -p ${target_rootfs}/var/lib/dpkg/info
- mkdir -p ${target_rootfs}/var/lib/dpkg/updates
-
- > ${target_rootfs}/var/lib/dpkg/status
- > ${target_rootfs}/var/lib/dpkg/available
-
- apt-get update
-
- if [ ! -z "${package_linguas}" ]; then
- for i in ${package_linguas}; do
- apt-get ${APT_ARGS} install $i --force-yes --allow-unauthenticated
- if [ $? -ne 0 ]; then
- exit 1
- fi
- done
- fi
-
- # normal install
- if [ ! -z "${package_to_install}" ]; then
- apt-get ${APT_ARGS} install ${package_to_install} --force-yes --allow-unauthenticated
- if [ $? -ne 0 ]; then
- exit 1
- fi
-
- # Attempt to correct the probable broken dependencies in place.
- apt-get ${APT_ARGS} -f install
- if [ $? -ne 0 ]; then
- exit 1
- fi
- fi
-
- rm -f `dirname ${BB_LOGFILE}`/log.do_${task}-attemptonly.${PID}
- if [ ! -z "${package_attemptonly}" ]; then
- for i in ${package_attemptonly}; do
- apt-get ${APT_ARGS} install $i --force-yes --allow-unauthenticated >> `dirname ${BB_LOGFILE}`/log.do_${task}-attemptonly.${PID} 2>&1 || true
- done
- fi
-
- find ${target_rootfs} -name \*.dpkg-new | for i in `cat`; do
- mv $i `echo $i | sed -e's,\.dpkg-new$,,'`
- done
-
- # Mark all packages installed
- sed -i -e "s/Status: install ok unpacked/Status: install ok installed/;" ${target_rootfs}/var/lib/dpkg/status
-}
-
-deb_log_check() {
- target="$1"
- lf_path="$2"
-
- lf_txt="`cat $lf_path`"
- for keyword_die in "^E:"
- do
- if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") >/dev/null 2>&1
- then
- echo "log_check: There were error messages in the logfile"
- printf "log_check: Matched keyword: [$keyword_die]\n\n"
- echo "$lf_txt" | grep -v log_check | grep -C 5 -i "$keyword_die"
- echo ""
- do_exit=1
- fi
- done
- test "$do_exit" = 1 && exit 1
- true
-}
-
python do_package_deb () {
import re, copy
import textwrap