diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2013-02-04 23:06:52 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-06 09:37:22 +0000 |
commit | 77b1409522abd9bef511a160ec2f768cdd3c7580 (patch) | |
tree | 49096409d9cd3b5436eda032a3bb577d39ec4f84 /meta/classes | |
parent | 626dc8b98937bece2793b7f40761bb37b21f8771 (diff) | |
download | poky-77b1409522abd9bef511a160ec2f768cdd3c7580.tar.gz |
ipk: use OPKGLIBDIR in all places
* it's not recommended to change this value, because it breaks upgrade path on target
(all old u-a alternatives are forgot in old OPKGLIBDIR value
* but make it consistent, so if someone really want to change that, then
setting OPKGLIBDIR_distro in distro.conf would be enough
* without this there were at least 4 places to change:
rootfs_ipk: opkglibdir variable (notice that I've removed /opkg from it to correspond
with EXTRA_OECONF option used in opkg recipes
package_ipk: ${target_rootfs}${localstatedir}/lib/opkg/ hardcoded in
package_install_internal_ipk
opkg-collateral: value in lists file
opkg: EXTRA_OECONF for all 3 classes, FILES_libopkg, do_install
* validated with buildhistory that without OPKGLIBDIR explicitly set the
output is the same and that after setting
OPKGLIBDIR_forcevariable := "${libdir}"
everything including empty directory from package_ipk is moved to
libdir
(From OE-Core rev: cf0aa9c4fdae8855803e96b1922d54a2431795d3)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/package_ipk.bbclass | 4 | ||||
-rw-r--r-- | meta/classes/rootfs_ipk.bbclass | 16 |
2 files changed, 11 insertions, 9 deletions
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass index 433d0bbe88..e46a52a022 100644 --- a/meta/classes/package_ipk.bbclass +++ b/meta/classes/package_ipk.bbclass | |||
@@ -12,6 +12,8 @@ OPKGBUILDCMD ??= "opkg-build" | |||
12 | 12 | ||
13 | OPKG_ARGS = "-f $INSTALL_CONF_IPK -o $INSTALL_ROOTFS_IPK --force_postinstall --prefer-arch-to-version" | 13 | OPKG_ARGS = "-f $INSTALL_CONF_IPK -o $INSTALL_ROOTFS_IPK --force_postinstall --prefer-arch-to-version" |
14 | 14 | ||
15 | OPKGLIBDIR = "${localstatedir}/lib" | ||
16 | |||
15 | python package_ipk_fn () { | 17 | python package_ipk_fn () { |
16 | d.setVar('PKGFN', d.getVar('PKG')) | 18 | d.setVar('PKGFN', d.getVar('PKG')) |
17 | } | 19 | } |
@@ -138,7 +140,7 @@ package_install_internal_ipk() { | |||
138 | local package_to_install="${INSTALL_PACKAGES_NORMAL_IPK}" | 140 | local package_to_install="${INSTALL_PACKAGES_NORMAL_IPK}" |
139 | local package_multilib="${INSTALL_PACKAGES_MULTILIB_IPK}" | 141 | local package_multilib="${INSTALL_PACKAGES_MULTILIB_IPK}" |
140 | 142 | ||
141 | mkdir -p ${target_rootfs}${localstatedir}/lib/opkg/ | 143 | mkdir -p ${target_rootfs}${OPKGLIBDIR}/opkg |
142 | 144 | ||
143 | local ipkg_args="${OPKG_ARGS}" | 145 | local ipkg_args="${OPKG_ARGS}" |
144 | 146 | ||
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass index 0e2fa12ac9..b73ff4bbce 100644 --- a/meta/classes/rootfs_ipk.bbclass +++ b/meta/classes/rootfs_ipk.bbclass | |||
@@ -19,11 +19,11 @@ OPKG_PREPROCESS_COMMANDS = "package_update_index_ipk; package_generate_ipkg_conf | |||
19 | 19 | ||
20 | OPKG_POSTPROCESS_COMMANDS = "ipk_insert_feed_uris; " | 20 | OPKG_POSTPROCESS_COMMANDS = "ipk_insert_feed_uris; " |
21 | 21 | ||
22 | opkglibdir = "${localstatedir}/lib/opkg" | 22 | OPKGLIBDIR = "${localstatedir}/lib" |
23 | 23 | ||
24 | # Which packages to not install on the basis of a recommendation | 24 | # Which packages to not install on the basis of a recommendation |
25 | BAD_RECOMMENDATIONS ?= "" | 25 | BAD_RECOMMENDATIONS ?= "" |
26 | MULTILIBRE_ALLOW_REP = "${opkglibdir}" | 26 | MULTILIBRE_ALLOW_REP = "${OPKGLIBDIR}/opkg" |
27 | 27 | ||
28 | fakeroot rootfs_ipk_do_rootfs () { | 28 | fakeroot rootfs_ipk_do_rootfs () { |
29 | set -x | 29 | set -x |
@@ -37,8 +37,8 @@ fakeroot rootfs_ipk_do_rootfs () { | |||
37 | 37 | ||
38 | export INSTALL_CONF_IPK="${IPKGCONF_TARGET}" | 38 | export INSTALL_CONF_IPK="${IPKGCONF_TARGET}" |
39 | export INSTALL_ROOTFS_IPK="${IMAGE_ROOTFS}" | 39 | export INSTALL_ROOTFS_IPK="${IMAGE_ROOTFS}" |
40 | STATUS=${IMAGE_ROOTFS}${opkglibdir}/status | 40 | STATUS=${IMAGE_ROOTFS}${OPKGLIBDIR}/opkg/status |
41 | mkdir -p ${IMAGE_ROOTFS}${opkglibdir} | 41 | mkdir -p ${IMAGE_ROOTFS}${OPKGLIBDIR}/opkg |
42 | 42 | ||
43 | opkg-cl ${OPKG_ARGS} update | 43 | opkg-cl ${OPKG_ARGS} update |
44 | 44 | ||
@@ -93,7 +93,7 @@ fakeroot rootfs_ipk_do_rootfs () { | |||
93 | 93 | ||
94 | ${ROOTFS_POSTPROCESS_COMMAND} | 94 | ${ROOTFS_POSTPROCESS_COMMAND} |
95 | 95 | ||
96 | rm -f ${IMAGE_ROOTFS}${opkglibdir}/lists/* | 96 | rm -f ${IMAGE_ROOTFS}${OPKGLIBDIR}/opkg/lists/* |
97 | if ${@base_contains("IMAGE_FEATURES", "package-management", "false", "true", d)}; then | 97 | if ${@base_contains("IMAGE_FEATURES", "package-management", "false", "true", d)}; then |
98 | if ! grep Status:.install.ok.unpacked ${STATUS}; then | 98 | if ! grep Status:.install.ok.unpacked ${STATUS}; then |
99 | # All packages were successfully configured. | 99 | # All packages were successfully configured. |
@@ -120,7 +120,7 @@ fakeroot rootfs_ipk_do_rootfs () { | |||
120 | 120 | ||
121 | rootfs_ipk_write_manifest() { | 121 | rootfs_ipk_write_manifest() { |
122 | manifest=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest | 122 | manifest=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest |
123 | cp ${IMAGE_ROOTFS}${opkglibdir}/status $manifest | 123 | cp ${IMAGE_ROOTFS}${OPKGLIBDIR}/opkg/status $manifest |
124 | 124 | ||
125 | sed '/Depends/d' -i $manifest | 125 | sed '/Depends/d' -i $manifest |
126 | sed '/Status/d' -i $manifest | 126 | sed '/Status/d' -i $manifest |
@@ -133,9 +133,9 @@ rootfs_ipk_write_manifest() { | |||
133 | } | 133 | } |
134 | 134 | ||
135 | remove_packaging_data_files() { | 135 | remove_packaging_data_files() { |
136 | rm -rf ${IMAGE_ROOTFS}${opkglibdir} | 136 | rm -rf ${IMAGE_ROOTFS}${OPKGLIBDIR}/opkg |
137 | # We need the directory for the package manager lock | 137 | # We need the directory for the package manager lock |
138 | mkdir ${IMAGE_ROOTFS}${opkglibdir} | 138 | mkdir ${IMAGE_ROOTFS}${OPKGLIBDIR}/opkg |
139 | } | 139 | } |
140 | 140 | ||
141 | list_installed_packages() { | 141 | list_installed_packages() { |