diff options
| author | Lianhao Lu <lianhao.lu@intel.com> | 2011-01-30 12:56:40 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-01 23:59:37 +0000 |
| commit | b94f9ccd05a339a5e3e8ec4c7bd8c727ca575871 (patch) | |
| tree | 83d59d1829f85fbc3ea176f2dffa4badc1c580b0 /meta/classes/package_ipk.bbclass | |
| parent | f23e67f172c4e5d39b91edd3c91a55bfcf346192 (diff) | |
| download | poky-b94f9ccd05a339a5e3e8ec4c7bd8c727ca575871.tar.gz | |
rootfs_ipk/package_ipk.bbclass: Move func from rootfs_ipk to package_ipk
package_ipk.bbclass:
Added new function package_install_internal_ipk() to install a list of
ipk packages to a specified root directory, with the specified package
architecutre information.
rootfs_ipk.bbclass:
Used the above new functions to install rootfs.
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Diffstat (limited to 'meta/classes/package_ipk.bbclass')
| -rw-r--r-- | meta/classes/package_ipk.bbclass | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass index ba768746ca..3c2472bc10 100644 --- a/meta/classes/package_ipk.bbclass +++ b/meta/classes/package_ipk.bbclass | |||
| @@ -61,6 +61,49 @@ python package_ipk_install () { | |||
| 61 | raise bb.build.FuncFailed | 61 | raise bb.build.FuncFailed |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | # | ||
| 65 | # install a bunch of packages using opkg | ||
| 66 | # the following shell variables needs to be set before calling this func: | ||
| 67 | # INSTALL_ROOTFS_IPK - install root dir | ||
| 68 | # INSTALL_CONF_IPK - configuration file | ||
| 69 | # INSTALL_PACKAGES_NORMAL_IPK - packages to be installed | ||
| 70 | # INSTALL_PACKAGES_ATTEMPTONLY_IPK - packages attemped to be installed only | ||
| 71 | # INSTALL_PACKAGES_LINGUAS_IPK - additional packages for uclibc | ||
| 72 | # INSTALL_TASK_IPK - task name | ||
| 73 | |||
| 74 | package_install_internal_ipk() { | ||
| 75 | |||
| 76 | local target_rootfs="${INSTALL_ROOTFS_IPK}" | ||
| 77 | local conffile="${INSTALL_CONF_IPK}" | ||
| 78 | local package_to_install="${INSTALL_PACKAGES_NORMAL_IPK}" | ||
| 79 | local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_IPK}" | ||
| 80 | local package_lingusa="${INSTALL_PACKAGES_LINGUAS_IPK}" | ||
| 81 | local task="${INSTALL_TASK_IPK}" | ||
| 82 | |||
| 83 | mkdir -p ${target_rootfs}${localstatedir}/lib/opkg/ | ||
| 84 | |||
| 85 | local ipkg_args="-f ${conffile} -o ${target_rootfs} --force-overwrite" | ||
| 86 | |||
| 87 | opkg-cl ${ipkg_args} update | ||
| 88 | |||
| 89 | # Uclibc builds don't provide this stuff... | ||
| 90 | if [ x${TARGET_OS} = "xlinux" ] || [ x${TARGET_OS} = "xlinux-gnueabi" ] ; then | ||
| 91 | if [ ! -z "${package_lingusa}" ]; then | ||
| 92 | for i in ${package_lingusa}; do | ||
| 93 | opkg-cl ${ipkg_args} install $i | ||
| 94 | done | ||
| 95 | fi | ||
| 96 | fi | ||
| 97 | |||
| 98 | if [ ! -z "${package_to_install}" ]; then | ||
| 99 | opkg-cl ${ipkg_args} install ${package_to_install} | ||
| 100 | fi | ||
| 101 | |||
| 102 | if [ ! -z "${package_attemptonly}" ]; then | ||
| 103 | opkg-cl ${ipkg_args} install ${package_attemptonly} > "${WORKDIR}/temp/log.do_${task}_attemptonly.${PID}" || true | ||
| 104 | fi | ||
| 105 | } | ||
| 106 | |||
| 64 | ipk_log_check() { | 107 | ipk_log_check() { |
| 65 | target="$1" | 108 | target="$1" |
| 66 | lf_path="$2" | 109 | lf_path="$2" |
