[oe-commits] Li Zhou : opkg-utils: Change alternatives lib path from /usr/lib/opkg to / var/lib/opkg

git at git.openembedded.org git at git.openembedded.org
Sun Jul 12 21:51:09 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: ed209aecf8e09d247fd58cf8ec3f8798a6c8d6d4
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=ed209aecf8e09d247fd58cf8ec3f8798a6c8d6d4

Author: Li Zhou <li.zhou at windriver.com>
Date:   Tue May 26 15:26:25 2015 +0800

opkg-utils: Change alternatives lib path from /usr/lib/opkg to /var/lib/opkg

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>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 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 74b974d..4b8bf3c 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
@@ -24,8 +24,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"



More information about the Openembedded-commits mailing list