<div dir="ltr">Please make it respect the variable used in opkg.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 13, 2015 at 11:41 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 change back the<br>
directory in update-alternatives only.<br>
<br>
Signed-off-by: Li Zhou &lt;<a href="mailto:li.zhou@windriver.com">li.zhou@windriver.com</a>&gt;<br>
---<br>
 ...Change-alternatives-lib-path-from-usr-lib.patch |   36 ++++++++++++++++++++<br>
 meta/recipes-devtools/opkg-utils/<a href="http://opkg-utils_git.bb" target="_blank">opkg-utils_git.bb</a> |    4 ++-<br>
 2 files changed, 39 insertions(+), 1 deletion(-)<br>
 create mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-utils-Change-alternatives-lib-path-from-usr-lib.patch<br>
<br>
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-utils-Change-alternatives-lib-path-from-usr-lib.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-utils-Change-alternatives-lib-path-from-usr-lib.patch<br>
new file mode 100644<br>
index 0000000..60d2a1f<br>
--- /dev/null<br>
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-utils-Change-alternatives-lib-path-from-usr-lib.patch<br>
@@ -0,0 +1,36 @@<br>
+From 5ca5f2f4a6b1bd82a1349542f4541c017cb5c132 Mon Sep 17 00:00:00 2001<br>
+From: Li Zhou &lt;<a href="mailto:li.zhou@windriver.com">li.zhou@windriver.com</a>&gt;<br>
+Date: Wed, 13 May 2015 15:12:10 +0800<br>
+Subject: [PATCH] opkg-utils: Change alternatives lib path from /usr/lib/opkg<br>
+ to /var/lib/opkg<br>
+<br>
+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 change back the<br>
+directory in update-alternatives only.<br>
+Upstream-Status: Inappropriate [It is related with oe-core configuration.]<br>
+Signed-off-by: Li Zhou &lt;<a href="mailto:li.zhou@windriver.com">li.zhou@windriver.com</a>&gt;<br>
+---<br>
+ update-alternatives |    2 +-<br>
+ 1 file changed, 1 insertion(+), 1 deletion(-)<br>
+<br>
+diff --git a/update-alternatives b/update-alternatives<br>
+index c332309..b08ecc0 100644<br>
+--- a/update-alternatives<br>
++++ b/update-alternatives<br>
+@@ -21,7 +21,7 @@<br>
+ set -e<br>
+<br>
+ # admin dir<br>
+-ad=&quot;$OPKG_OFFLINE_ROOT/usr/lib/opkg/alternatives&quot;<br>
++ad=&quot;$OPKG_OFFLINE_ROOT/var/lib/opkg/alternatives&quot;<br>
+<br>
+ usage() {<br>
+       echo &quot;update-alternatives: $*<br>
+--<br>
+1.7.9.5<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..68d9a19 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>
@@ -10,7 +10,9 @@ PROVIDES += &quot;virtual/update-alternatives&quot;<br>
 SRCREV = &quot;53274f087565fd45d8452c5367997ba6a682a37a&quot;<br>
 PV = &quot;0.1.8+git${SRCPV}&quot;<br>
<br>
-SRC_URI = &quot;git://<a href="http://git.yoctoproject.org/opkg-utils" target="_blank">git.yoctoproject.org/opkg-utils</a>&quot;<br>
+SRC_URI = &quot;git://<a href="http://git.yoctoproject.org/opkg-utils" target="_blank">git.yoctoproject.org/opkg-utils</a> \<br>
+           file://0001-opkg-utils-Change-alternatives-lib-path-from-usr-lib.patch \<br>
+&quot;<br>
<br>
 S = &quot;${WORKDIR}/git&quot;<br>
<span class="HOEnZb"><font color="#888888"><br>
--<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>