summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2011-11-08 14:19:37 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-08 14:32:55 +0000
commit1ef442561d9784209f56e8c283824c1f2de3e2d1 (patch)
treef6e5185244cd4f3159513973ebfcc910028e639a
parentf9735f3bac60459f2e92ec088cd529d414db9c14 (diff)
downloadpoky-1ef442561d9784209f56e8c283824c1f2de3e2d1.tar.gz
multilib: Drop MULTILIB_IMAGE_INSTALL
There should just be a single IMAGE_INSTALL variable. If the package backends need this split into different multilib components they should be responsible for doing this, not the user. This commit removes the MULTILIB_IMAGE_INSTALL variable. [YOCTO #1564] (From OE-Core rev: 7736862a74c92fe1afe42e170822be13117575c2) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/image.bbclass4
-rw-r--r--meta/classes/multilib.bbclass5
-rw-r--r--meta/classes/package_ipk.bbclass31
-rw-r--r--meta/classes/package_rpm.bbclass37
-rw-r--r--meta/classes/rootfs_ipk.bbclass3
-rw-r--r--meta/classes/rootfs_rpm.bbclass3
6 files changed, 42 insertions, 41 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 05f43314b5..48b78da79b 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -5,8 +5,7 @@ inherit imagetest-${IMAGETEST}
5 5
6LICENSE = "MIT" 6LICENSE = "MIT"
7PACKAGES = "" 7PACKAGES = ""
8MULTILIB_IMAGE_INSTALL ?= "" 8RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL} ${NORMAL_FEATURE_INSTALL}"
9RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL} ${MULTILIB_IMAGE_INSTALL} ${NORMAL_FEATURE_INSTALL}"
10RRECOMMENDS += "${NORMAL_FEATURE_INSTALL_OPTIONAL}" 9RRECOMMENDS += "${NORMAL_FEATURE_INSTALL_OPTIONAL}"
11 10
12INHIBIT_DEFAULT_DEPS = "1" 11INHIBIT_DEFAULT_DEPS = "1"
@@ -54,7 +53,6 @@ IMAGE_INSTALL ?= ""
54IMAGE_INSTALL[type] = "list" 53IMAGE_INSTALL[type] = "list"
55IMAGE_BASENAME[export] = "1" 54IMAGE_BASENAME[export] = "1"
56export PACKAGE_INSTALL ?= "${IMAGE_INSTALL} ${FEATURE_INSTALL}" 55export PACKAGE_INSTALL ?= "${IMAGE_INSTALL} ${FEATURE_INSTALL}"
57export MULTILIB_PACKAGE_INSTALL ?= "${MULTILIB_IMAGE_INSTALL}"
58PACKAGE_INSTALL_ATTEMPTONLY ?= "${FEATURE_INSTALL_OPTIONAL}" 56PACKAGE_INSTALL_ATTEMPTONLY ?= "${FEATURE_INSTALL_OPTIONAL}"
59 57
60# Images are generally built explicitly, do not need to be part of world. 58# Images are generally built explicitly, do not need to be part of world.
diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index 1aed2a9f97..6eb3bc3756 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -56,9 +56,8 @@ python __anonymous () {
56 map_dependencies("PACKAGE_INSTALL", d) 56 map_dependencies("PACKAGE_INSTALL", d)
57 map_dependencies("LINGUAS_INSTALL", d) 57 map_dependencies("LINGUAS_INSTALL", d)
58 map_dependencies("RDEPENDS", d) 58 map_dependencies("RDEPENDS", d)
59 pinstall = d.getVar("LINGUAS_INSTALL", True) + " " + d.getVar("PACKAGE_INSTALL", True) + " " + d.getVar("MULTILIB_PACKAGE_INSTALL", False) 59 pinstall = d.getVar("LINGUAS_INSTALL", True) + " " + d.getVar("PACKAGE_INSTALL", True)
60 d.setVar("MULTILIB_PACKAGE_INSTALL", pinstall) 60 d.setVar("PACKAGE_INSTALL", pinstall)
61 d.setVar("PACKAGE_INSTALL", "")
62 d.setVar("LINGUAS_INSTALL", "") 61 d.setVar("LINGUAS_INSTALL", "")
63 # FIXME, we need to map this to something, not delete it! 62 # FIXME, we need to map this to something, not delete it!
64 d.setVar("PACKAGE_INSTALL_ATTEMPTONLY", "") 63 d.setVar("PACKAGE_INSTALL_ATTEMPTONLY", "")
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index c97e36eeb2..d41b40d2c5 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -86,12 +86,34 @@ package_tryout_install_multilib_ipk() {
86 fi 86 fi
87 done 87 done
88} 88}
89
90split_multilib_packages() {
91 INSTALL_PACKAGES_NORMAL_IPK=""
92 INSTALL_PACKAGES_MULTILIB_IPK=""
93 for pkg in ${INSTALL_PACKAGES_IPK}; do
94 is_multilib=0
95 for item in ${MULTILIB_VARIANTS}; do
96 local pkgname_prefix="${item}-"
97 if [ ${pkg:0:${#pkgname_prefix}} == ${pkgname_prefix} ]; then
98 is_multilib=1
99 break
100 fi
101 done
102
103 if [ ${is_multilib} = 0 ]; then
104 INSTALL_PACKAGES_NORMAL_IPK="${INSTALL_PACKAGES_NORMAL_IPK} ${pkg}"
105 else
106 INSTALL_PACKAGES_MULTILIB_IPK="${INSTALL_PACKAGES_MULTILIB_IPK} ${pkg}"
107 fi
108 done
109}
110
89# 111#
90# install a bunch of packages using opkg 112# install a bunch of packages using opkg
91# the following shell variables needs to be set before calling this func: 113# the following shell variables needs to be set before calling this func:
92# INSTALL_ROOTFS_IPK - install root dir 114# INSTALL_ROOTFS_IPK - install root dir
93# INSTALL_CONF_IPK - configuration file 115# INSTALL_CONF_IPK - configuration file
94# INSTALL_PACKAGES_NORMAL_IPK - packages to be installed 116# INSTALL_PACKAGES_IPK - packages to be installed
95# INSTALL_PACKAGES_ATTEMPTONLY_IPK - packages attemped to be installed only 117# INSTALL_PACKAGES_ATTEMPTONLY_IPK - packages attemped to be installed only
96# INSTALL_PACKAGES_LINGUAS_IPK - additional packages for uclibc 118# INSTALL_PACKAGES_LINGUAS_IPK - additional packages for uclibc
97# INSTALL_TASK_IPK - task name 119# INSTALL_TASK_IPK - task name
@@ -100,12 +122,15 @@ package_install_internal_ipk() {
100 122
101 local target_rootfs="${INSTALL_ROOTFS_IPK}" 123 local target_rootfs="${INSTALL_ROOTFS_IPK}"
102 local conffile="${INSTALL_CONF_IPK}" 124 local conffile="${INSTALL_CONF_IPK}"
103 local package_to_install="${INSTALL_PACKAGES_NORMAL_IPK}"
104 local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_IPK}" 125 local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_IPK}"
105 local package_linguas="${INSTALL_PACKAGES_LINGUAS_IPK}" 126 local package_linguas="${INSTALL_PACKAGES_LINGUAS_IPK}"
106 local package_multilib="${INSTALL_PACKAGES_MULTILIB_IPK}"
107 local task="${INSTALL_TASK_IPK}" 127 local task="${INSTALL_TASK_IPK}"
108 128
129 split_multilib_packages
130
131 local package_to_install="${INSTALL_PACKAGES_NORMAL_IPK}"
132 local package_multilib="${INSTALL_PACKAGES_MULTILIB_IPK}"
133
109 mkdir -p ${target_rootfs}${localstatedir}/lib/opkg/ 134 mkdir -p ${target_rootfs}${localstatedir}/lib/opkg/
110 135
111 local ipkg_args="-f ${conffile} -o ${target_rootfs} --force-overwrite" 136 local ipkg_args="-f ${conffile} -o ${target_rootfs} --force-overwrite"
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 7f425837be..df5a2db8a1 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -154,7 +154,7 @@ resolve_package_rpm () {
154# INSTALL_PLATFORM_RPM - main platform 154# INSTALL_PLATFORM_RPM - main platform
155# INSTALL_PLATFORM_EXTRA_RPM - extra platform 155# INSTALL_PLATFORM_EXTRA_RPM - extra platform
156# INSTALL_CONFBASE_RPM - configuration file base name 156# INSTALL_CONFBASE_RPM - configuration file base name
157# INSTALL_PACKAGES_NORMAL_RPM - packages to be installed 157# INSTALL_PACKAGES_RPM - packages to be installed
158# INSTALL_PACKAGES_ATTEMPTONLY_RPM - packages attemped to be installed only 158# INSTALL_PACKAGES_ATTEMPTONLY_RPM - packages attemped to be installed only
159# INSTALL_PACKAGES_LINGUAS_RPM - additional packages for uclibc 159# INSTALL_PACKAGES_LINGUAS_RPM - additional packages for uclibc
160# INSTALL_PROVIDENAME_RPM - content for provide name 160# INSTALL_PROVIDENAME_RPM - content for provide name
@@ -166,8 +166,7 @@ package_install_internal_rpm () {
166 local platform="${INSTALL_PLATFORM_RPM}" 166 local platform="${INSTALL_PLATFORM_RPM}"
167 local platform_extra="${INSTALL_PLATFORM_EXTRA_RPM}" 167 local platform_extra="${INSTALL_PLATFORM_EXTRA_RPM}"
168 local confbase="${INSTALL_CONFBASE_RPM}" 168 local confbase="${INSTALL_CONFBASE_RPM}"
169 local package_to_install="${INSTALL_PACKAGES_NORMAL_RPM}" 169 local package_to_install="${INSTALL_PACKAGES_RPM}"
170 local multilib_to_install="${INSTALL_PACKAGES_MULTILIB_RPM}"
171 local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_RPM}" 170 local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_RPM}"
172 local package_linguas="${INSTALL_PACKAGES_LINGUAS_RPM}" 171 local package_linguas="${INSTALL_PACKAGES_LINGUAS_RPM}"
173 local providename="${INSTALL_PROVIDENAME_RPM}" 172 local providename="${INSTALL_PROVIDENAME_RPM}"
@@ -211,12 +210,14 @@ package_install_internal_rpm () {
211 echo "Processing $pkg..." 210 echo "Processing $pkg..."
212 211
213 archvar=base_archs 212 archvar=base_archs
213 manifest=install.manifest
214 ml_prefix=`echo ${pkg} | cut -d'-' -f1` 214 ml_prefix=`echo ${pkg} | cut -d'-' -f1`
215 ml_pkg=$pkg 215 ml_pkg=$pkg
216 for i in ${MULTILIB_PREFIX_LIST} ; do 216 for i in ${MULTILIB_PREFIX_LIST} ; do
217 if [ ${ml_prefix} == ${i} ]; then 217 if [ ${ml_prefix} == ${i} ]; then
218 ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,") 218 ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,")
219 archvar=ml_archs 219 archvar=ml_archs
220 manifest=install_multilib.manifest
220 break 221 break
221 fi 222 fi
222 done 223 done
@@ -226,7 +227,7 @@ package_install_internal_rpm () {
226 echo "Unable to find package $pkg ($ml_pkg)!" 227 echo "Unable to find package $pkg ($ml_pkg)!"
227 exit 1 228 exit 1
228 fi 229 fi
229 echo $pkg_name >> ${target_rootfs}/install/install.manifest 230 echo $pkg_name >> ${target_rootfs}/install/${manifest}
230 done 231 done
231 fi 232 fi
232 fi 233 fi
@@ -235,12 +236,14 @@ package_install_internal_rpm () {
235 echo "Processing $pkg..." 236 echo "Processing $pkg..."
236 237
237 archvar=base_archs 238 archvar=base_archs
239 manifest=install.manifest
238 ml_prefix=`echo ${pkg} | cut -d'-' -f1` 240 ml_prefix=`echo ${pkg} | cut -d'-' -f1`
239 ml_pkg=$pkg 241 ml_pkg=$pkg
240 for i in ${MULTILIB_PREFIX_LIST} ; do 242 for i in ${MULTILIB_PREFIX_LIST} ; do
241 if [ ${ml_prefix} == ${i} ]; then 243 if [ ${ml_prefix} == ${i} ]; then
242 ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,") 244 ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,")
243 archvar=ml_archs 245 archvar=ml_archs
246 manifest=install_multilib.manifest
244 break 247 break
245 fi 248 fi
246 done 249 done
@@ -250,7 +253,7 @@ package_install_internal_rpm () {
250 echo "Unable to find package $pkg ($ml_pkg)!" 253 echo "Unable to find package $pkg ($ml_pkg)!"
251 exit 1 254 exit 1
252 fi 255 fi
253 echo $pkg_name >> ${target_rootfs}/install/install.manifest 256 echo $pkg_name >> ${target_rootfs}/install/${manifest}
254 done 257 done
255 fi 258 fi
256 259
@@ -356,29 +359,7 @@ package_install_internal_rpm () {
356 359
357 touch ${target_rootfs}/install/install_multilib_solution.manifest 360 touch ${target_rootfs}/install/install_multilib_solution.manifest
358 361
359 if [ ! -z "${multilib_to_install}" ]; then 362 if [ -e "${target_rootfs}/install/install_multilib.manifest" ]; then
360 for pkg in ${multilib_to_install} ; do
361 echo "Processing $pkg..."
362
363 archvar=base_archs
364 ml_prefix=`echo ${pkg} | cut -d'-' -f1`
365 ml_pkg=$pkg
366 for i in ${MULTILIB_PREFIX_LIST} ; do
367 if [ ${ml_prefix} == ${i} ]; then
368 ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,")
369 archvar=ml_archs
370 break
371 fi
372 done
373
374 pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${ml_pkg})
375 if [ -z "$pkg_name" ]; then
376 echo "Unable to find package $pkg ($ml_pkg)!"
377 exit 1
378 fi
379 echo $pkg_name >> ${target_rootfs}/install/install_multilib.manifest
380 done
381
382 # multilib package installation 363 # multilib package installation
383 364
384 # Generate an install solution by doing a --justdb install, then recreate it with 365 # Generate an install solution by doing a --justdb install, then recreate it with
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 3094c1ac5f..ffc4a72c06 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -58,8 +58,7 @@ fakeroot rootfs_ipk_do_rootfs () {
58 58
59 export INSTALL_ROOTFS_IPK="${IMAGE_ROOTFS}" 59 export INSTALL_ROOTFS_IPK="${IMAGE_ROOTFS}"
60 export INSTALL_CONF_IPK="${IPKGCONF_TARGET}" 60 export INSTALL_CONF_IPK="${IPKGCONF_TARGET}"
61 export INSTALL_PACKAGES_NORMAL_IPK="${PACKAGE_INSTALL}" 61 export INSTALL_PACKAGES_IPK="${PACKAGE_INSTALL}"
62 export INSTALL_PACKAGES_MULTILIB_IPK="${MULTILIB_PACKAGE_INSTALL}"
63 62
64 package_install_internal_ipk 63 package_install_internal_ipk
65 64
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index dd370b263a..9f50764886 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -57,8 +57,7 @@ fakeroot rootfs_rpm_do_rootfs () {
57 export INSTALL_ROOTFS_RPM="${IMAGE_ROOTFS}" 57 export INSTALL_ROOTFS_RPM="${IMAGE_ROOTFS}"
58 export INSTALL_PLATFORM_RPM="${TARGET_ARCH}" 58 export INSTALL_PLATFORM_RPM="${TARGET_ARCH}"
59 export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}" 59 export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}"
60 export INSTALL_PACKAGES_NORMAL_RPM="${PACKAGE_INSTALL}" 60 export INSTALL_PACKAGES_RPM="${PACKAGE_INSTALL}"
61 export INSTALL_PACKAGES_MULTILIB_RPM="${MULTILIB_PACKAGE_INSTALL}"
62 export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${PACKAGE_INSTALL_ATTEMPTONLY}" 61 export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${PACKAGE_INSTALL_ATTEMPTONLY}"
63 export INSTALL_PACKAGES_LINGUAS_RPM="${LINGUAS_INSTALL}" 62 export INSTALL_PACKAGES_LINGUAS_RPM="${LINGUAS_INSTALL}"
64 export INSTALL_PROVIDENAME_RPM="" 63 export INSTALL_PROVIDENAME_RPM=""