<div dir="ltr">Do you realize that this completely break the existing alternatives on target when upgrading from the binary feed? In oe-classic days I wrote migration script executed in postinst to recover from the worst breakage, but it still wasn't ideal.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 31, 2017 at 3:12 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@<wbr>opkglibdir@/opkg/alternatives"<wbr>><br>
to <ad="$OPKG_OFFLINE_ROOT/usr/<wbr>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-<wbr>utils/<a href="http://opkg-utils_0.3.5.bb" rel="noreferrer" target="_blank">opkg-utils_0.3.5.bb</a> | 3 +++<br>
1 file changed, 3 insertions(+)<br>
<br>
diff --git a/meta/recipes-devtools/opkg-<wbr>utils/<a href="http://opkg-utils_0.3.5.bb" rel="noreferrer" target="_blank">opkg-utils_0.3.5.bb</a> b/meta/recipes-devtools/opkg-<wbr>utils/<a href="http://opkg-utils_0.3.5.bb" rel="noreferrer" target="_blank">opkg-utils_0.3.5.bb</a><br>
index 646cc8f..ea32246 100644<br>
--- a/meta/recipes-devtools/opkg-<wbr>utils/<a href="http://opkg-utils_0.3.5.bb" rel="noreferrer" target="_blank">opkg-utils_0.3.5.bb</a><br>
+++ b/meta/recipes-devtools/opkg-<wbr>utils/<a href="http://opkg-utils_0.3.5.bb" rel="noreferrer" target="_blank">opkg-utils_0.3.5.bb</a><br>
@@ -25,6 +25,8 @@ PACKAGECONFIG = "python update-alternatives"<br>
PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}"<br>
PACKAGECONFIG[update-<wbr>alternatives] = ",,,"<br>
<br>
+target_localstatedir := "${localstatedir}"<br>
+OPKGLIBDIR = "${target_localstatedir}/lib"<br>
do_install() {<br>
oe_runmake PREFIX=${prefix} DESTDIR=${D} install<br>
if ! ${@bb.utils.contains('<wbr>PACKAGECONFIG', 'update-alternatives', 'true', 'false', d)}; then<br>
@@ -34,6 +36,7 @@ do_install() {<br>
if ! ${@bb.utils.contains('<wbr>PACKAGECONFIG', 'python', 'true', 'false', d)}; then<br>
grep -lZ "/usr/bin/env.*python" ${D}${bindir}/* | xargs -0 rm<br>
fi<br>
+ sed -i s:/usr/lib/opkg:${OPKGLIBDIR}/<wbr>opkg: ${D}${bindir}/update-<wbr>alternatives<br>
}<br>
<br>
do_install_append_class-<wbr>target() {<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.9.1<br>
<br>
--<br>
______________________________<wbr>_________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>core</a><br>
</font></span></blockquote></div><br></div>