<div dir="ltr">Please use the same variable with weak assignment like opkg recipes (so that it can be easily changed from distro config).<div><br></div><div>This also breaks all upgrade paths, is it acceptable? In oe-classic days I've created postinst script which were migrating existing update-alternatives in the rootfs when update-alternatives-cworth was upgraded with different path.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 20, 2015 at 3:31 AM, Li Zhou <span dir="ltr"><<a href="mailto:li.zhou@windriver.com" target="_blank">li.zhou@windriver.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">When update-alternatives is moved from opkg to opkg-utils, a line in<br>
the file is changed<br>
from <ad="$OPKG_OFFLINE_ROOT@opkglibdir@/opkg/alternatives"><br>
to <ad="$OPKG_OFFLINE_ROOT/usr/lib/opkg/alternatives">.<br>
But opkglibdir doesn't equal to "/usr/lib" here, but equal to "/var/lib"<br>
 in oe-core build by configuring --with-opkglibdir.<br>
opkg-utils can't get the var value in opkg, so here define opkglibdir to<br>
set the path.<br>
<br>
Signed-off-by: Li Zhou <<a href="mailto:li.zhou@windriver.com">li.zhou@windriver.com</a>><br>
---<br>
 meta/recipes-devtools/opkg-utils/<a href="http://opkg-utils_git.bb" target="_blank">opkg-utils_git.bb</a> |  3 +++<br>
 1 file changed, 3 insertions(+)<br>
<br>
diff --git a/meta/recipes-devtools/opkg-utils/<a href="http://opkg-utils_git.bb" target="_blank">opkg-utils_git.bb</a> b/meta/recipes-devtools/opkg-utils/<a href="http://opkg-utils_git.bb" target="_blank">opkg-utils_git.bb</a><br>
index 2800a5d..fc12d91 100644<br>
--- a/meta/recipes-devtools/opkg-utils/<a href="http://opkg-utils_git.bb" target="_blank">opkg-utils_git.bb</a><br>
+++ b/meta/recipes-devtools/opkg-utils/<a href="http://opkg-utils_git.bb" target="_blank">opkg-utils_git.bb</a><br>
@@ -22,8 +22,11 @@ PYTHONRDEPS_class-native = ""<br>
 PACKAGECONFIG = "python"<br>
 PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}"<br>
<br>
+opkglibdir = "/var/lib"<br>
+<br>
 do_install() {<br>
    oe_runmake PREFIX=${prefix} DESTDIR=${D} install<br>
+Â Â Â Â sed -i s:/usr/lib/opkg:${opkglibdir}/opkg: ${D}${bindir}/update-alternatives<br>
 }<br>
<br>
 PACKAGES =+ "update-alternatives-opkg"<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.9.5<br>
<br>
--<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</font></span></blockquote></div><br></div>