[OE-core] [PATCH v4] opkg-utils: Change alternatives lib path from /usr/lib/opkg to /var/lib/opkg
Li Zhou
li.zhou at windriver.com
Tue Oct 31 02:12:42 UTC 2017
When update-alternatives is moved from opkg to opkg-utils, a line in
the file is changed
from <ad="$OPKG_OFFLINE_ROOT at opkglibdir@/opkg/alternatives">
to <ad="$OPKG_OFFLINE_ROOT/usr/lib/opkg/alternatives">.
But opkglibdir doesn't equal to "/usr/lib" here, but equal to "/var/lib"
in oe-core build by configuring --with-opkglibdir.
opkg-utils can't get the var value in opkg, so here define OPKGLIBDIR to
set the path.
Signed-off-by: Li Zhou <li.zhou at windriver.com>
---
meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb
index 646cc8f..ea32246 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb
@@ -25,6 +25,8 @@ PACKAGECONFIG = "python update-alternatives"
PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}"
PACKAGECONFIG[update-alternatives] = ",,,"
+target_localstatedir := "${localstatedir}"
+OPKGLIBDIR = "${target_localstatedir}/lib"
do_install() {
oe_runmake PREFIX=${prefix} DESTDIR=${D} install
if ! ${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'true', 'false', d)}; then
@@ -34,6 +36,7 @@ do_install() {
if ! ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then
grep -lZ "/usr/bin/env.*python" ${D}${bindir}/* | xargs -0 rm
fi
+ sed -i s:/usr/lib/opkg:${OPKGLIBDIR}/opkg: ${D}${bindir}/update-alternatives
}
do_install_append_class-target() {
--
1.9.1
More information about the Openembedded-core
mailing list