[OE-core] [PATCH v3] opkg-utils: Change alternatives lib path from /usr/lib/opkg to /var/lib/opkg

Li Zhou li.zhou at windriver.com
Tue May 26 07:26:25 UTC 2015


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_git.bb |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
index 2800a5d..9c1c995 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
@@ -22,8 +22,11 @@ PYTHONRDEPS_class-native = ""
 PACKAGECONFIG = "python"
 PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}"
 
+OPKGLIBDIR ?= "/var/lib"
+
 do_install() {
 	oe_runmake PREFIX=${prefix} DESTDIR=${D} install
+	sed -i s:/usr/lib/opkg:${OPKGLIBDIR}/opkg: ${D}${bindir}/update-alternatives
 }
 
 PACKAGES =+ "update-alternatives-opkg"
-- 
1.7.9.5




More information about the Openembedded-core mailing list