<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&#39;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">&lt;<a href="mailto:li.zhou@windriver.com" target="_blank">li.zhou@windriver.com</a>&gt;</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 &lt;ad=&quot;$OPKG_OFFLINE_ROOT@opkglibdir@/opkg/alternatives&quot;&gt;<br>
to &lt;ad=&quot;$OPKG_OFFLINE_ROOT/usr/lib/opkg/alternatives&quot;&gt;.<br>
But opkglibdir doesn&#39;t equal to &quot;/usr/lib&quot; here, but equal to &quot;/var/lib&quot;<br>
 in oe-core build by configuring --with-opkglibdir.<br>
opkg-utils can&#39;t get the var value in opkg, so here define opkglibdir to<br>
set the path.<br>
<br>
Signed-off-by: Li Zhou &lt;<a href="mailto:li.zhou@windriver.com">li.zhou@windriver.com</a>&gt;<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 = &quot;&quot;<br>
 PACKAGECONFIG = &quot;python&quot;<br>
 PACKAGECONFIG[python] = &quot;,,,${PYTHONRDEPS}&quot;<br>
<br>
+opkglibdir = &quot;/var/lib&quot;<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 =+ &quot;update-alternatives-opkg&quot;<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>