Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] opkg-utils: Change alternatives lib path from /usr/lib/opkg to /var/lib/opkg
@ 2015-05-20  1:31 Li Zhou
  2015-05-20  6:07 ` Martin Jansa
  2015-07-11 22:39 ` Richard Purdie
  0 siblings, 2 replies; 9+ messages in thread
From: Li Zhou @ 2015-05-20  1:31 UTC (permalink / raw)
  To: openembedded-core

When update-alternatives is moved from opkg to opkg-utils, a line in
the file is changed
from <ad="$OPKG_OFFLINE_ROOT@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@windriver.com>
---
 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 2800a5d..fc12d91 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
@@ -22,8 +22,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"
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [PATCH] opkg-utils: Change alternatives lib path from /usr/lib/opkg to /var/lib/opkg
@ 2015-05-13  9:41 Li Zhou
  2015-05-13  9:57 ` Martin Jansa
  0 siblings, 1 reply; 9+ messages in thread
From: Li Zhou @ 2015-05-13  9:41 UTC (permalink / raw)
  To: openembedded-core

When update-alternatives is moved from opkg to opkg-utils, a line in
the file is changed
from <ad="$OPKG_OFFLINE_ROOT@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 change back the
directory in update-alternatives only.

Signed-off-by: Li Zhou <li.zhou@windriver.com>
---
 ...Change-alternatives-lib-path-from-usr-lib.patch |   36 ++++++++++++++++++++
 meta/recipes-devtools/opkg-utils/opkg-utils_git.bb |    4 ++-
 2 files changed, 39 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-utils-Change-alternatives-lib-path-from-usr-lib.patch

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
new file mode 100644
index 0000000..60d2a1f
--- /dev/null
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-utils-Change-alternatives-lib-path-from-usr-lib.patch
@@ -0,0 +1,36 @@
+From 5ca5f2f4a6b1bd82a1349542f4541c017cb5c132 Mon Sep 17 00:00:00 2001
+From: Li Zhou <li.zhou@windriver.com>
+Date: Wed, 13 May 2015 15:12:10 +0800
+Subject: [PATCH] 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@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 change back the
+directory in update-alternatives only.
+Upstream-Status: Inappropriate [It is related with oe-core configuration.]
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+---
+ update-alternatives |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/update-alternatives b/update-alternatives
+index c332309..b08ecc0 100644
+--- a/update-alternatives
++++ b/update-alternatives
+@@ -21,7 +21,7 @@
+ set -e
+ 
+ # admin dir
+-ad="$OPKG_OFFLINE_ROOT/usr/lib/opkg/alternatives"
++ad="$OPKG_OFFLINE_ROOT/var/lib/opkg/alternatives"
+ 
+ usage() {
+ 	echo "update-alternatives: $*
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
index 2800a5d..68d9a19 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
@@ -10,7 +10,9 @@ PROVIDES += "virtual/update-alternatives"
 SRCREV = "53274f087565fd45d8452c5367997ba6a682a37a"
 PV = "0.1.8+git${SRCPV}"
 
-SRC_URI = "git://git.yoctoproject.org/opkg-utils"
+SRC_URI = "git://git.yoctoproject.org/opkg-utils \
+           file://0001-opkg-utils-Change-alternatives-lib-path-from-usr-lib.patch \
+"
 
 S = "${WORKDIR}/git"
 
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-07-31  3:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-20  1:31 [PATCH] opkg-utils: Change alternatives lib path from /usr/lib/opkg to /var/lib/opkg Li Zhou
2015-05-20  6:07 ` Martin Jansa
2015-05-21 10:00   ` Zhou, Li
2015-07-11 22:39 ` Richard Purdie
2015-07-31  2:55   ` Rongqing Li
2015-07-31  3:20     ` ChenQi
2015-07-31  3:20       ` Rongqing Li
  -- strict thread matches above, loose matches on Subject: below --
2015-05-13  9:41 Li Zhou
2015-05-13  9:57 ` Martin Jansa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox